c# - 下载包“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,但它没有用。
我怎么解决这个问题?
解决方案
我的所有包裹也遇到了这个问题。但是如果我将 nupkg 链接复制到我的浏览器,我可以很好地下载包。所以这是某个地方的VS的问题。我提交了一个错误。
为了解决这个问题,因为我发现没有其他解决方案似乎有效,我从Nuget 下载页面下载了 nuget.exe ,然后在命令行中运行以下命令:
nuget restore MySolution.sln
这很好地下载了所有软件包。完成后,我可以毫无问题地在 VS 中运行我的项目。
推荐阅读
- android - 迁移到 androidx 后膨胀类时出错
- python - numba 给出正确结果的否定,这是一个错误吗?
- generics - Kotlin 在从泛型类生成实例时提供类型
- android - Firebase 身份验证使用谷歌登录失败
- ios - 如何在 iOS 中设计这种带有左右动画的可交换卡片视图?
- r - 准备具有外部依赖项的 CRAN R 包 (nlopt)
- .htaccess - 在 htaccess 中结合重写条件
- ios - 通用链接 iOS:如果未安装应用程序,则打开商店链接
- c# - UWP - 无论大写还是小写字母都搜索gridview
- google-analytics - 在 Google Analytics(分析)/增强型电子商务中正确跟踪购物车事件