Cannot restore nuget packages on VSTS (Packages failed to install)

本秂侑毒 提交于 2020-01-03 16:01:16

问题


I'm using Visual Studio Team Services to build a .NET solution. I have a Nuget Installer task to restore the packages of the solution that is configured as follows:

Nuget.config file has 2 package sources - one is nuget.org (v2) and the other is a custom feed (Nuget Server v2.5.40416.9020). All packages from the nuget.org feed are restored but the ones from the custom feed are not, for each package from the custom feed there is an error message like this:

Unable to find version 'abc' of package 'xyz'

Error:

[error]Error: C:\a_tasks\NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b\0.2.22\node_modules\nuget-task-common\NuGet\3.3.0\NuGet.exe failed with return code: 1 [error]Packages failed to install

This was working fine 1 or 2 days ago.

Locally everything seems to work fine. Also, I tried with the nuget version 3.5.0 and a custom version of nuget.exe, without success.

Any suggestions?


回答1:


I just had this error today. I fixed this error by reviewing the changes in my solution file with our base code branch and found some old lines that weren't supposed to be there. I think they were a result of a bad merge and should have been removed during a conflict resolve.

To fix the issue I simply removed the references that were old and everything built just fine.

Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Services", "Services", "{EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}"
EndProject
{3C14F190-6B6A-4913-9681-AFD9B62850FA} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}
{687ECE00-A567-40F3-BFF9-C3B639328F27} = {EAECFF2D-7339-4180-8E1E-6DF9EC9EB131}

Thanks, Fissh



来源:https://stackoverflow.com/questions/40243135/cannot-restore-nuget-packages-on-vsts-packages-failed-to-install

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!