title: VSTS Release: NuGet Publisher Step Fails
body: <p>I'm playing with Release features in Visual Studio Online. My project is built into a nuget package that I would like to publish to a nuget feed.</p>
  
  <p>I'm successfully building nuget package and publish it into Artifacts and I can see required file when I try to browse Artifacts. Then I switch into VSO Release and as part of release I have Nuget Publisher step: </p>
  
  <p><a href="https://i.stack.imgur.com/pW5B2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/pW5B2.png" alt="VSO release screenshot"></a></p>
  
  <p>I'm using VSO internal nuget feed with address like this:</p>
  
  <blockquote>
    <p><a href="https://mytenant.pkgs.visualstudio.com/DefaultCollection/_packaging/myfeedname/nuget/v3/index.json" rel="nofollow noreferrer">https://mytenant.pkgs.visualstudio.com/DefaultCollection/_packaging/myfeedname/nuget/v3/index.json</a></p>
  </blockquote>
  
  <p>When I create new release this step fails:</p>
  
  <pre><code>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 Creating Nuget Arguments 
  [error]Cannot bind argument to parameter 'Path' because it is null. 
  [error]You cannot call a method on a null-valued expression.
  </code></pre>
  
  <p>Obviously nuget file path is not being passed to the script. Also I have tried to specify exact path to the nuget (selected from dropdowns):</p>
  
  <blockquote>
    <p>$(System.DefaultWorkingDirectory)\Build &amp; Test\nuget package\MyPackageName.1.1.16014.7.nupkg</p>
  </blockquote>
  
  <p>But got the same error. </p>
  
  <p>This step only fails when I use it in VSO Release. When I use Nuget Publisher step as a build step and specify same nuget feed address and "Path/Pattern to nupkg" as <code>**\bin\MyPackageName.*.nupkg</code>, I get the package published to the feed.</p>
  
  <p>Any idea how to fix this error for VSO Release?</p>
  
  <p><strong>UPD</strong>: this is the log debug output </p>
  
  <pre><code>&gt;Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39
  &gt;Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39\NuGetPublisher.ps1
  &gt;[debug]Importing modules
  &gt;[debug]Loading module from path 'C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\Modules\Microsoft.TeamFoundation.DistributedTask.Task.Internal\Microsoft.TeamFoundation.DistributedTask.Task.Internal.dll'.
  &gt;[debug]Importing cmdlet 'Add-BuildAttachment'.
  &gt;[debug]Importing cmdlet 'Convert-String'.
  &gt;
  &gt;...SNIP...
  &gt;
  &gt;[debug]Importing cmdlet 'Find-Files'.
  &gt;[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
  &gt;[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
  &gt;[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
  &gt;[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  &gt;[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
  &gt;[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
  &gt;[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
  &gt;[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  &gt;[debug]Entering script System.Management.Automation.InvocationInfo.MyCommand.Name
  &gt;[debug]Parameter Values
  &gt;[debug]searchPattern = C:\a\0dbc15949\**\*.nupkg
  &gt;[debug]nuGetFeedType = internal
  &gt;[debug]connectedServiceName = 
  &gt;[debug]feedName = https://MyName.pkgs.visualstudio.com/DefaultCollection/_packaging/MyFeedName/nuget/v3/index.json
  &gt;[debug]nuGetAdditionalArgs = 
  &gt;[debug]nuGetPath = 
  &gt;Check/Set nuget path
  &gt;Creating Nuget Arguments
  &gt;[debug]Using provided feed URL
  &gt;[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
  &gt;[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
  &gt;[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
  &gt;[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  &gt;[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
  </code></pre>
  
  <p>Here is the <a href="http://pastie.org/private/vptpvs2mo0og07u6sixw" rel="nofollow noreferrer">full log</a> for Nuget Publisher step</p>