【发布时间】:2020-10-21 23:50:12
【问题描述】:
在最新的 Windows10 上的 VS 2017 中,我安装了 Nuget Package Manager 4.6。我刚刚清除了所有 nuget 缓存,现在如果我尝试将 Nuget 添加到任何项目,或者构建具有 nuget 依赖项的项目,我会收到下载错误。
例如
Resolving actions to install package 'Newtonsoft.Json.12.0.3'
Resolved actions to install package 'Newtonsoft.Json.12.0.3'
Retrieving package 'Newtonsoft.Json 12.0.3' from 'nuget.org'.
GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg
OK https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg 28ms
Installing Newtonsoft.Json 12.0.3.
Error downloading 'Newtonsoft.Json.12.0.3' from 'https://api.nuget.org/v3-flatcontainer/newtonsoft.json/12.0.3/newtonsoft.json.12.0.3.nupkg'.
我在同一台机器上的浏览器中看不到 Nuget.org 的任何问题,现在我基本上无法构建任何东西!可能是什么问题?
【问题讨论】:
-
哪些窗口? nuget 关闭了 TLS1.0/1.1 支持。您需要 TLS 1.2 支持:devblogs.microsoft.com/nuget/…
-
W10.我使用的是包管理器而不是 Powershell,所以我读了这篇文章,因为它应该可以工作......今天早些时候它也工作了。清除缓存导致问题。
-
啊哈,好像是这个问题:stackoverflow.com/questions/10582001/…
-
可以在 Nuget 包管理器 UI 下访问
nuget.org吗? -
我发现你使用
https://api.nuget.org/v3-flatcontainer/.........作为nuget.org路径,请尝试使用这个:https://www.nuget.org/api/v2/作为nuget.org。
标签: visual-studio visual-studio-2017 nuget