无法在VSTS上还原Nuget软件包(软件包安装失败) [英] Cannot restore nuget packages on VSTS (Packages failed to install)

查看:214
本文介绍了无法在VSTS上还原Nuget软件包(软件包安装失败)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio Team Services构建.NET解决方案.我有一个Nuget Installer任务来还原配置如下的解决方案的程序包:

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文件有2个软件包源-一个是 nuget.org(v2)另一个是自定义Feed(Nuget Server v2.5.40416.9020). nuget.org提要中的所有软件包都已还原,但自定义提要中的软件包未恢复,对于自定义提要中的每个软件包,都会出现如下错误消息:

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:

找不到软件包"xyz"的版本"abc"

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

错误:

[错误]错误: C:\ a_tasks \ NuGetInstaller_333b11bd-d341-40d9-afcf-b32d5ce6f23b \ 0.2.22 \ node_modules \ nuget-task-common \ NuGet \ 3.3.0 \ NuGet.exe 失败,返回码:1 [错误]软件包安装失败

[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

这在1或2天前运行良好.

This was working fine 1 or 2 days ago.

在本地,一切似乎都正常.另外,我尝试使用nuget版本3.5.0和自定义版本的nuget.exe,但没有成功.

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.

有什么建议吗?

推荐答案

我今天刚遇到此错误.我通过使用基础代码分支查看解决方案文件中的更改来修复此错误,并发现了一些原本不应该存在的旧行.我认为它们是错误合并的结果,应该在解决冲突时将其删除.

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}

谢谢, 菲什(Fissh)

Thanks, Fissh

这篇关于无法在VSTS上还原Nuget软件包(软件包安装失败)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆