本文介绍了将Nuget包推送到Visual Studio Online包提要的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在VSO帐户上启用了 Package 服务,但是当我尝试在构建过程中推送软件包时,会引发错误.有什么建议吗?
I have the Package service enabled on my VSO account but when I try to push packages through build process, it throws an error. Any advise?
## [错误]对象引用未设置为对象的实例.
用户名:密码:
## [错误]从工具NuGet.exe返回的意外退出代码1
##[error]Unexpected exit code 1 returned from tool NuGet.exe
日志
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
推荐答案
之前有一个相同的问题,您可以参考.根本原因和解决方法已包括在其中.
There is a same issue asked before, you can refer to this question for details. The root cause and the workaround is included in it.
这篇关于将Nuget包推送到Visual Studio Online包提要的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!