我在 Visual Studio 2017 中使用移动应用程序,但是当我第一次创建这个项目并尝试构建它时,出现了以下错误:
Failed to download package 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1' from 'https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg'.
The HTTP request to 'GET https://api.nuget.org/v3-flatcontainer/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk/2.1.1/runtime.win10-x86.microsoft.net.uwpcoreruntimesdk.2.1.1.nupkg' has timed out after 100000ms.
我搜索并发现有人建议我应该将我的 DNS 服务器从 8.8.8.8 更改为 208.67.222.222,但它没有用。
我该如何解决这个问题?
最佳答案
我的所有包裹也遇到了这个问题。但是如果我将 nupkg 链接复制到我的浏览器,我可以很好地下载这个包。所以这是 VS 某处的问题。我提交了 bug .
为了解决这个问题,因为我发现没有其他解决方案似乎有效,我从 Nuget Download page 下载了 nuget.exe然后在命令行中运行以下命令:
nuget restore MySolution.sln
这会很好地下载所有包。一旦完成,我就可以在 VS 中毫无问题地运行我的项目。
关于c# - 下载包 'runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1'失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51554477/