Выпуск VSTS: сбой на этапе издателя NuGet

Я играю с функциями выпуска в Visual Studio Online. Мой проект встроен в пакет nuget, который я хотел бы опубликовать в ленте nuget.

Я успешно создаю пакет nuget и публикую его в артефактах, и я вижу требуемый файл, когда пытаюсь просмотреть артефакты. Затем я переключаюсь на выпуск VSO, и как часть выпуска у меня есть шаг Nuget Publisher:

Снимок экрана выпуска VSO

Я использую внутренний канал nuget VSO с таким адресом:

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 & Test \ nuget package \ MyPackageName.1.1.16014.7.nupkg

Но получил ту же ошибку.

Этот шаг не работает, только когда я использую его в VSO Release. Когда я использую шаг Nuget Publisher в качестве шага сборки и указываю тот же адрес фида nuget и «Путь / шаблон к nupkg» в качестве **\bin\MyPackageName.*.nupkg, я получаю пакет, опубликованный в фиде.

Есть идеи, как исправить эту ошибку для выпуска VSO?

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.


comment
Добавьте переменную system.debug в среду RM и установите для нее значение true. Это должно дать вам некоторое представление о том, где на самом деле возникает проблема, поскольку в задаче NugetPackage будут включены подробные отладочные сообщения. Похоже, у него проблемы с путем к самому файлу nuget.exe, а не к вашему пакету.   -  person d3r3kk    schedule 14.01.2016
comment
@ d3r3kk хороший крик. Я добавил переменную отладки для этапов сборки, но никогда не осознавал, что этапы выпуска имеют свои собственные переменные. См. Обновление вопроса. Теперь не намного яснее - либо нет пути к nuget.exe. Или в файл пакета.   -  person trailmax    schedule 14.01.2016


Ответы (1)


Это была ошибка в задаче NuGet Publisher. Это было исправлено в нашем развертывании Sprint 94.

person Matt Cooper    schedule 14.01.2016
comment
Большое спасибо! Я, наверное, подожду вашего развертывания. tfx у меня не получилось в прошлый раз. - person trailmax; 14.01.2016