将Nuget包推送到Visual Studio Online Package提要

时间:2015-12-04 01:49:00

标签: nuget azure-devops

我在VSO帐户上启用了 Package 服务,但是当我尝试通过构建过程推送包时,它会抛出错误。有什么建议吗?

错误

  

请提供以下内容的凭据:https://ilerler.pkgs.visualstudio.com/DefaultCollection/_packaging/Main/nuget/v2/

     

## [error]对象引用未设置为对象的实例。

     

用户名:密码:

     

## [error]从工具NuGet.exe返回意外的退出代码1

日志

2015-12-04T01:36:28.1988899Z Set workingFolder to default: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39
2015-12-04T01:36:28.2008909Z Executing the powershell script: C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\tasks\NuGetPublisher\0.1.39\NuGetPublisher.ps1
2015-12-04T01:36:28.3238908Z Check/Set nuget path
2015-12-04T01:36:28.3258901Z Creating Nuget Arguments
2015-12-04T01:36:28.3608909Z Getting credentials for Microsoft.TeamFoundation.DistributedTask.Agent.Common.TaskEndpoint
2015-12-04T01:36:28.8138749Z Setting credentials for httpsilerlerpkgsvisualstudiocomDefaultCollectionpackagingMainnugetv2
2015-12-04T01:36:28.9598774Z C:\a\1\NuGet
2015-12-04T01:36:28.9608764Z Saving to C:\a\1\NuGet\newNuGet.config
2015-12-04T01:36:28.9648769Z Pattern found in solution parameter.
2015-12-04T01:36:28.9658752Z Find-Files -SearchPattern C:\a\1\s\**\Ruya.Core.*.nupkg
2015-12-04T01:36:29.0488979Z Found files: 1
2015-12-04T01:36:29.0518782Z File: C:\a\1\s\Main\nuget\Ruya.Core.1.223.15337.20341.nupkg
2015-12-04T01:36:29.0528761Z Invoking nuget with push C:\a\1\s\Main\nuget\Ruya.Core.1.223.15337.20341.nupkg -s https://ilerler.pkgs.visualstudio.com/DefaultCollection/_packaging/Main/nuget/v2  -configFile "C:\a\1\NuGet\newNuGet.config" -apiKey VssSessionKey on C:\a\1\s\Main\nuget\Ruya.Core.1.223.15337.20341.nupkg
2015-12-04T01:36:29.0538797Z C:\LR\MMS\Services\Mms\TaskAgentProvisioner\Tools\agents\default\agent\worker\tools\NuGet.exe push C:\a\1\s\Main\nuget\Ruya.Core.1.223.15337.20341.nupkg -s https://ilerler.pkgs.visualstudio.com/DefaultCollection/_packaging/Main/nuget/v2  -configFile "C:\a\1\NuGet\newNuGet.config" -apiKey VssSessionKey
2015-12-04T01:36:29.8121321Z Pushing Ruya.Core 1.223.15337.20341 to 'https://ilerler.pkgs.visualstudio.com/DefaultCollection/_packaging/Main/nuget/v2'...
2015-12-04T01:36:30.0481938Z Using credentials from config. UserName: VssSessionToken
2015-12-04T01:36:30.8740306Z Using credentials from config. UserName: VssSessionToken
2015-12-04T01:36:31.3286903Z Please provide credentials for: https://ilerler.pkgs.visualstudio.com/DefaultCollection/_packaging/Main/nuget/v2/
2015-12-04T01:36:31.3426871Z ##[error]Object reference not set to an instance of an object.
2015-12-04T01:36:31.3436873Z UserName: Password: 
2015-12-04T01:36:31.4303476Z ##[error]Unexpected exit code 1 returned from tool NuGet.exe

1 个答案:

答案 0 :(得分:2)

之前有一个问题,您可以参考this question了解详情。根本原因和解决方法包含在其中。