【发布时间】:2019-07-19 08:26:41
【问题描述】:
我有一个.NET Core 2.1 应用程序,无法再运行dotnet restore。
我收到此错误:
恢复包 D:\Work-2\Anubis\Core\AnubisServer.Server\AnubisServer.
Server.csproj... 恢复在 22.22 毫秒内完成 D:\Work-2\Anubis\Core\COM\SharedCOM\SharedCO
M.csproj。恢复在 26.09 毫秒内完成 D:\Work-2\Anubis\Core\AnubisServer.Shared\An
ubisServer.Shared.csproj。恢复在 26.07 毫秒内完成 D:\Work-2\Anubis\Core\Server\Extensions\Exte
nsions.csproj。恢复在 26.12 毫秒内完成 D:\Work-2\Anubis\Core\AnubisServer.Client\An
ubisServer.Client.csproj。 C:\程序 Files\dotnet\sdk\3.0.100-preview-009812\NuGet.targets(114,5): 错误: 无法加载源的服务索引 https://api.nuget.org/v3/index.json
. [D:\Work-2\Anubis\Core\AnubisServer.Server\AnubisServer.Server.csproj] C:\程序 Files\dotnet\sdk\3.0.100-preview-009812\NuGet.targets(114,5): 错误: 无法建立 SSL 连接,请参阅内部异常。 [D:\Work-2\
Anubis\Core\AnubisServer.Server\AnubisServer.Server.csproj] C:\Program Files\dotnet\sdk\3.0.100-preview-009812\NuGet.targets(114,5): 错误: 无法从传输连接读取数据:连接 尝试失败
d因为连接方在一段时间后没有正确响应 时间,o
r 建立连接失败,因为连接的主机未能 回应.. [
D:\Work-2\Anubis\Core\AnubisServer.Server\AnubisServer.Server.csproj] C:\程序 Files\dotnet\sdk\3.0.100-preview-009812\NuGet.targets(114,5): 错误: 连接尝试失败,因为连接方没有 适当地回应
一段时间后,或建立连接失败,因为 连接h
ost 没有回应。 [D:\Work-2\Anubis\Core\AnubisServer.Server\AnubisServ
er.Server.csproj]
如您所见,这一切都围绕api.nuget.org/v3/index.json 解决,但我不知道出了什么问题。
我看过以前的answers 并尝试过:
-从 C:/Users:/[用户名]/Nuget 中删除 Nuget 文件夹
- 查看C:\Users\[user]\AppData\Roaming\NuGet.config 文件并查看所有网址是否正常
Nuget.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
让我感到好奇的是,它直到今天都运行良好。我没有对系统进行任何更改。
【问题讨论】:
标签: nuget dotnet-restore