首页 > 解决方案 > 无法在 VS Mac 上更新 asp.net 核心项目中的包

问题描述

执行 Project-> Update NuGet Packages 时出现以下错误。

为源“ https://api.nuget.org/v3-flatcontainer/buildbundlerminifier/index.json ”重试“FindPackagesByIdAsync” 。无法建立 SSL 连接,请参阅内部异常。无法将数据写入传输连接:套接字未连接。套接字未连接重试源“ https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.all/index.json ”的“FindPackagesByIdAsync” 。无法建立 SSL 连接,请参阅内部异常。无法将数据写入传输连接:套接字未连接。套接字未连接 GET https://api.nuget.org/v3-flatcontainer/buildbundlerminifier/index.json GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore。无法从远程源“ https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.all/index.json ” 检索有关“Microsoft.AspNetCore.All”的信息。

我尝试通过 Project->Manage NuGet Packages 添加包。但是得到同样的错误!

在此处输入图像描述

这是我的 PM 控制台的屏幕截图

标签: c#asp.net-corenugetvisual-studio-mac

解决方案


刚刚想出了一个解决方法。

当我从 CLI 运行 #dotnet restore 时,它​​可以工作!


推荐阅读