How to add OctoPackNuGetPushProperties while building from within Visual Studio?

I’m trying to increase the NuGet timeout for uploading the publishing package of my application. I’m currently using Visual Studio csproj file configuration to upload the release builds to server. Sometime the package doesn’t get uploaded due to timeout and there is the configuration available on Octo.exe but how to achieve the same from within Visual Studio?

Hi,

Thanks for reaching out! The same way you are already passing the MSBuild Octopack parameters from the .csproj, you can pass -timeout 600 to nuget like this:

  <PropertyGroup>
    <RunOctoPack>true</RunOctoPack>
    <OctopackPublishPackageToHttp>http://localhost:82/nuget/packages</OctopackPublishPackageToHttp>
    <OctopackPublishAPIKey>API-B3ZK7BTFAKSKRTCHQFKAZNPT5Y</OctopackPublishAPIKey>
    <OctopackNugetPushProperties>-Timeout 600</OctopackNugetPushProperties>
  </PropertyGroup>

The timeout time is in seconds.

Hope that helps,
Dalmiro