【发布时间】:2022-10-17 16:31:03
【问题描述】:
从今天开始,由于某种原因,我无法通过 Visual Studio 连接到 NuGet 包管理器。
[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
An error occurred while sending the request.
The underlying connection was closed: An unexpected error occurred on a send.
Authentication failed because the remote party has closed the transport stream.
但我无法让它再次工作...... 我试过的东西。
- 删除 NuGet.config
- 清除 NuGet 缓存
- 明确禁用 TLS1.0 和 TLS1.1
- 明确启用 TLS1.2
- 按照https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/ nuget 的手册进行操作
- 不同的 Visual Studio
- 更新到最新的 Visual Studio 2019
- 在 RegEdit 中为 1.0、1.1 和 1.2 尝试了不同的 TLS 设置。我还没有 TLS1.3 部分。
- 我可以用 chrome 浏览到https://api.nuget.org/v3/index.json
眼镜: Windows 服务器 2012R2、Visual Studio 2019
还在不同的 Windows Server 2012R2 机器上尝试过,同样的问题
它仍然可以在装有 Windows 10 的笔记本电脑上运行。
希望有人有想法。
谢谢
【问题讨论】:
标签: visual-studio nuget tls1.2