首页 > 解决方案 > 下载包“runtime.win10-x86.Microsoft.Net.UWPCoreRuntimeSdk.2.1.1”失败

问题描述

我正在使用 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,但它没有用。

我怎么解决这个问题?

标签: c#visual-studiocompiler-errorsnuget

解决方案


我的所有包裹也遇到了这个问题。但是如果我将 nupkg 链接复制到我的浏览器,我可以很好地下载包。所以这是某个地方的VS的问题。我提交了一个错误

为了解决这个问题,因为我发现没有其他解决方案似乎有效,我从Nuget 下载页面下载了 nuget.exe ,然后在命令行中运行以下命令:

nuget restore MySolution.sln

这很好地下载了所有软件包。完成后,我可以毫无问题地在 VS 中运行我的项目。


推荐阅读