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.

4

1 回答 1

1

经过很多挫折和无尽的时间,我找到了解决方案。

只需更新 My NuGet Packager 步骤的路径:

*\ProjectName1.nuspec;*\ProjectName2.nuspec

注意最后一个';' 字符已被删除。如果存在此字符,则 NuGet Packager 模板在此之后需要一个附加字符串,在我的情况下为空白。

突然之间,错误描述变得完全有意义。

于 2016-07-28T07:52:20.930 回答