为什么我的解决方案无法在一夜之间构建并出现错误“无法从远程源检索信息"? [英] Why did my solution fail to build overnight with the error "Failed to retrieve information from remote source"?

查看:32
本文介绍了为什么我的解决方案无法在一夜之间构建并出现错误“无法从远程源检索信息"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个解决方案文件,其中包含几个项目,这些项目使用dotnet"和dotnet"在我的计算机上构建得很好.CLI 以及 Visual Studio 2017.一夜之间,构建将失败,我无法关联可能归因于失败的更改.VS2017 和 CLI 都失败并显示如下消息:

We have a solution file which contains several projects which builds just fine on my computer using both "dotnet" CLI as well as Visual Studio 2017. Literally overnight, the build would fail, and I cannot associate the change that may have attributed to the failure. Both VS2017 and CLI failed with a message like this:

C:Program Filesdotnetsdk1.0.4NuGet.targets(97,5): 错误:无法从远程源D:mtpproj"检索有关System.Xml.XmlDocument"的信息.vshello_projinReleasePublishOutput'.[D:mtpproj.vsserver-raymy_solution.sln]

C:Program Filesdotnetsdk1.0.4NuGet.targets(97,5): error : Failed to retrieve information about 'System.Xml.XmlDocument' from remote source 'D:mtpproj.vshello_projinReleasePublishOutput'. [D:mtpproj.vsserver-raymy_solution.sln]

这是一种误导,因为这似乎表明 hello_proj 是为构建调试"而配置的.反对释放"显示.我已经尝试清除所有缓存的包,将包复制到解决方案所在的位置,并将包复制到错误指示的位置,但我无法克服这个错误.Nuget 显然是在某处获取一些信息以在错误的位置查找包,但我真的不知道它从哪里获取这些信息.我还验证了失踪"包存在于全局包"中.文件夹(通过运行nuget local all -list"找到).

This is is misleading, as the hello_proj where this seems to indicate, is configured for building "Debug" as oppose to the "Release" shown. I have already attempted to clear out all cached packages, copied packages to where the solution resides, and copied the packages to where the error indicates, but I could not get over this error. Nuget is obviously getting some information somewhere to look for the packages in the wrong place, but I don't really know where it gets that info from. I also verified that the "missing" packages exist in the "global-packages" folder (found by running "nuget local all -list").

推荐答案

我找到了解决我问题的方法;我在整个 C: 盘中搜索 Nuget.Config 并在 %appdata%NugetNuget.config 中找到了一个.我删除了它,构建成功完成.Nuget.config 已恢复为修复该问题的某些默认值.我无法解释;很高兴它奏效了.

I found something that fixed my problem; I searched for Nuget.Config in the entire C: drive and found one in %appdata%NugetNuget.config. I removed it and the build went through successfully. The Nuget.config was restored to some default values that fixed the problem. I can't explain it; just glad it worked.

这篇关于为什么我的解决方案无法在一夜之间构建并出现错误“无法从远程源检索信息"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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