VSTS版本:NuGet Publisher步骤失败

时间:2016-01-14 13:23:42

标签: azure-devops azure-pipelines azure-pipelines-release-pipeline azure-artifacts

我正在使用Visual Studio Online中的发布功能。我的项目内置于一个nuget包中,我想将其发布到nuget feed。

我正在成功构建nuget包并将其发布到Artifacts中,当我尝试浏览Artifacts时,我可以看到所需的文件。然后我切换到VSO版本,作为发布的一部分,我有Nuget Publisher步骤:

VSO release screenshot

我正在使用VSO内部nuget feed,地址如下:

  

https://mytenant.pkgs.visualstudio.com/DefaultCollection/_packaging/myfeedname/nuget/v3/index.json

当我创建新版本时,此步骤失败:

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.

显然nuget文件路径没有传递给脚本。此外,我试图指定nuget的确切路径(从下拉列表中选择):

  

$(System.DefaultWorkingDirectory)\ Build&测试\ nuget包\ MyPackageName.1.1.16014.7.nupkg

但得到了同样的错误。

此步骤仅在我在VSO版本中使用时失败。当我使用Nuget Publisher步骤作为构建步骤并指定相同的nuget feed地址和“path / Pattern to nupkg”作为**\bin\MyPackageName.*.nupkg时,我将包发布到Feed。

知道如何为VSO Release修复此错误吗?

UPD :这是日志调试输出

>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
>[debug]Importing modules
>[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'.
>[debug]Importing cmdlet 'Add-BuildAttachment'.
>[debug]Importing cmdlet 'Convert-String'.
>
>...SNIP...
>
>[debug]Importing cmdlet 'Find-Files'.
>[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
>[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
>[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
>[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
>[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
>[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
>[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
>[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
>[debug]Entering script System.Management.Automation.InvocationInfo.MyCommand.Name
>[debug]Parameter Values
>[debug]searchPattern = C:\a\0dbc15949\**\*.nupkg
>[debug]nuGetFeedType = internal
>[debug]connectedServiceName = 
>[debug]feedName = https://MyName.pkgs.visualstudio.com/DefaultCollection/_packaging/MyFeedName/nuget/v3/index.json
>[debug]nuGetAdditionalArgs = 
>[debug]nuGetPath = 
>Check/Set nuget path
>Creating Nuget Arguments
>[debug]Using provided feed URL
>[error]System.Management.Automation.ParameterBindingValidationException: Cannot bind argument to parameter 'Path' because it is null.
>[error]   at System.Management.Automation.Internal.PipelineProcessor.SynchronousExecuteEnumerate(Object input, Hashtable errorResults, Boolean enumerate)
>[error]   at System.Management.Automation.PipelineOps.InvokePipeline(Object input, Boolean ignoreInput, CommandParameterInternal[][] pipeElements, CommandBaseAst[] pipeElementAsts, CommandRedirection[][] commandRedirections, FunctionContext funcContext)
>[error]   at System.Management.Automation.Interpreter.ActionCallInstruction`6.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
>[error]   at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)

以下是Nuget Publisher步骤的full log

1 个答案:

答案 0 :(得分:4)

这是NuGet Publisher任务中的bug。我们的Sprint 94部署是fixed