I am using Visual Studio Team Services. The issue is with a Release definition that includes a NuGet Publisher task. I have the exact NuGet Publisher configuration working fine in a Build configuration, so I get the impression there is more to setting it up to run on Release. The error is:
Starting task: NuGet Publisher
Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39
Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39\NuGetPublisher.ps1
##[error]Cannot bind argument to parameter 'Path' because it is null.
##[error]Cannot bind argument to parameter 'Path' because it is null.
Check/Set nuget path
The same environment variables exist on my build profile as in the release profile. In the Release profile there is only the Nuget Publish step without the Packager step. Does this 'path' variable need to come from a packager/compile step? I wouldn't think there would be interdependencies like that.
You can reproduce this by simply creating a new build using the Visual Studio template. Then add NuGet Packager and NuGet Publisher steps just before the 'Artifacts' step. I like to output my nupkg to the $(BuildConfiguration)
directory to keep things consistent. This runs fine.
Next, disable the publish step. Then make a Release profile using the Empty template. Add the NuGet Publisher step. Link to the artifact source of the Build configuration in the previous step and then release. This will result in the error.