1
votes

I created a new solution and disabled nuget.org as my package source. I have different repositories added and all my packages are installed from there. On the build server I got an error:

Unable to load the service index for source https://api.nuget.org/v3/index.json. An error occurred while sending. the request. Unable to connect to the remote server. A connection attempt failed because the connected party did not properly respond after a period of time

It is because my company blocked Nuget, BUT I should not have any package from that repo.

Does somebody know where I can check if my package is from nuget.org (maybe I made mistake and download from the wrong source) or where to disable in solution/ NuGet that source permanently?

1

1 Answers

2
votes

Nuget package source setup

Since you are disable nuget.org as package source for your solution, so you should also disable it by the disabledPackageSources on the build server:

Go to the folder on your build server C:\Users\<Username>\AppData\Roaming\NuGet\NuGet.Config, add following to that file:

  <disabledPackageSources>
    <add key="nuget.org" value="true" />
  </disabledPackageSources>

Besides, if you are using TFS/VSTS to restore the nuget package, you can disable it from definition:

enter image description here