我有更新 3 的 Visual Studio Enterprise 2015。最近,NuGet 包管理器停止查找除脱机包集以外的任何包:Microsoft Visual Studio Offline Packages
.
我尝试打开不同的项目,重新启动 Visual Studio 并进行了修复/升级 Visual Studio。
我也尝试了这个问题中的所有方法:VS2015 nuget package manager not finding packages .
没有任何效果。
当我尝试从 Visual Studio NuGet UI 搜索/升级包时,会出现加载或搜索进度环,但没有加载任何内容。任务管理器和防火墙建议未建立任何连接。
最后出现这个:
[nuget.org] Unable to load the service index for source http://api.nuget.org/v3/index.json.
An error occurred while sending the request. Unable to connect to the remote server A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
我可能遗漏了一些明显的东西。我究竟做错了什么?
任何帮助表示赞赏。
最佳答案
最后,我自己解决了这个问题。如果将来有人遇到同样的问题,请在此处发布答案。
正如错误消息所建议的那样,这是一个连接问题。显然,NuGet 使用环境变量作为代理 http_proxy
即使在 Windows 设置中禁用了代理设置。我删除了环境变量并解决了问题。
事实上,错误记录在这里:https://github.com/NuGet/Home/issues/2880
Finally I found the issue, at least in my case: if no Windows HTTP proxy is specified, NuGet uses (if present) the HTTP Proxy specified in the environment variable http_proxy.
虽然,我有
http_proxy
甚至之前设置,NuGet 工作正常。因此,更新应该触发了该问题。感谢任何看过问题的人。
关于.net - VS2015 NuGet 包管理器未加载任何在线包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40955897/