.net core “网络出版”;无法加载源的服务索引https://api.nuget.org/v3/index.json"

.net core “网络出版”;无法加载源的服务索引https://api.nuget.org/v3/index.json",.net-core,.net Core,我收到了错误信息 Unable to load the service index for source https://api.nuget.org/v3/index.json' 在执行dotnet发布时。利用本地NuGet存储库(Artifactory),dotnet还原工作正常。我正在运行此操作的系统没有internet连接。但是,为什么dotnetpublish会接触到nuget.org?有没有办法防止这种情况发生 D:\tools\dotnet\dotnet.exe publish p

我收到了错误信息

Unable to load the service index for source https://api.nuget.org/v3/index.json'
在执行dotnet发布时。利用本地NuGet存储库(Artifactory),dotnet还原工作正常。我正在运行此操作的系统没有internet连接。但是,为什么dotnetpublish会接触到nuget.org?有没有办法防止这种情况发生

D:\tools\dotnet\dotnet.exe publish proj.sln --configuration Release --output bin/Release/PublishOutput
D:\tools\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : Unable to load the service index for source https://api.nuget.org/v3/index.json[D:\buildAgent_adetca06\work\5a1e5e99f083b612\proj.sln]
D:\tools\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : An error occurred while sending the request. [D:\buildAgent_adetca06\work\5a1e5e99f083b612\proj.sln]
D:\tools\dotnet\sdk\2.0.0\NuGet.targets(102,5): error : The operation timed out [D:\buildAgent_adetca06\work\5a1e5e99f083b612\proj.sln]
我的.NET环境

dotnet --info
.NET Command Line Tools (2.0.0)

Product Information:
 Version:            2.0.0
 Commit SHA-1 hash:  cdcd1928c9

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.3.9600
 OS Platform: Windows
 RID:         win81-x64
 Base Path:   D:\tools\dotnet\sdk\2.0.0\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.0
  Build    : e8b8861ac7faf042c87a5c2f9f2d04c98b69f28d

更新到2.0.5解决了这个问题。

我遇到了这个问题。我可以通过在我的服务器上启用代理来使它工作,但我不明白为什么这个命令需要internet连接才能工作。你找到答案了吗?不幸的是没有。但是切换到2.0.5有帮助。它对我不起作用。有人面临同样的问题吗?