0

While moving to the VSTS online builds, I'm running into the following error during my NuGet Packager step in which I package my artifacts into a nuget package based on a nuspec file in my project.

2016-07-28T04:24:41.7652305Z ##[error]Path cannot be null.
2016-07-28T04:24:41.7652305Z ##[error]Parameter name: path

My NuGet Packager step's path variable looks like this:

*\ProjectName1.nuspec;*\ProjectName2.nuspec;

I checked in nuget.exe 3.4.4 into my solution in the .nuget folder along with my nuget.config. I then, in advanced settings, specified this nuget.exe to be used by entering the following path as "Path to NuGet.exe"

$(Build.SourcesDirectory)\.nuget\nuget.exe

This didn't seem to help.

Prior to this, all other steps are working correctly and my projects are compiling without any issues.

Also, when I run nuget.exe pack command locally for these .nuspec files, the packages are created successfully.

Any input would be much appreciated. Thank you.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
FCP
  • 31
  • 4

1 Answers1

1

After much frustration and endless hours, I have found the solution.

Just update the My NuGet Packager step's path:

*\ProjectName1.nuspec;*\ProjectName2.nuspec

Note that the last ';' character has been removed. If this character is present, the NuGet Packager template is expecting an additional string after this, which in my case was blank.

All of a sudden the error description makes complete sense.

jessehouwing
  • 106,458
  • 22
  • 256
  • 341
FCP
  • 31
  • 4