4

I am getting the error message

Unable to load the service index for source https://api.nuget.org/v3/index.json'

on executing dotnet publish. dotnet restore is working fine with leveraging a local NuGet repository (Artifactory). The system I am running this on has no internet connection. But why does dotnet publish reach out to nuget.org? And is there a way to prevent this happening?

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]

My .NET enviroment

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
3
  • I'm having this exact problem. I can make it work by enabling a proxy on my server but I don't understand why this command requires an internet connection to work. Did you come up with any answers? Commented Mar 4, 2018 at 10:40
  • Unfortunatetly not. But switching to 2.0.5 helped. Commented Mar 6, 2018 at 13:25
  • It is not working for me. Any one is facing the same? Commented Feb 11, 2019 at 11:46

1 Answer 1

1

Updating to 2.0.5 solved this.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.