简短版:
如何更改Visual Studio 2019用于获取依赖项的默认TLS版本?
详细版:
截至Visual Studio 2019 v16.7.1(最新版本v16.7.2无法解决此问题),我似乎无法发布任何dotnet core项目。发布操作总是崩溃,并显示以下消息:
Publish has encountered an error.
Publish has encountered an error. We were unable to determine the cause of the error.
Check the output log for more details.
看一下输出窗口:
![错误信息](https://istack.dev59.com/bebTx.webp)
通过我的Web浏览器手动连接https://api.nuget.org/v3/index.json,可以看到nuget.org实际上使用的是。 我的问题是:如何告诉Visual Studio使用
TLSv1.2
而不是TLSv1
连接到nuget.org?或者这是否可能?是否有一个Windows注册表键可以做到这一点?我还没有尝试重新安装VS,但如果可能的话,我想避免这样做。
imsmn
的方法结合起来最终为我解决了问题。但奇怪的是,TLS设置之前几周发布一直很好,现在才成为了问题。 - Frederik Hoeft