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

nugetvisual-studio-2017

I am getting this error:

[nuget.org] 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, or established connection failed because
connected host has failed to respond 185.82.212.95:8080

Best Answer

I was having same issue in VS 2017. You would need to enable proxy settings for VS, so that it can use existing IE proxy to reach out internet. This is especially useful, for those users, who uses office laptops and proxy settings are managed by group policies and IE settings get updated automatically. It would have been great if there was an option within VS IDE itself to add proxy just like Eclipse IDE has.

Solution

  1. Go to your Visual Studio install location as below -

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE

  1. Open devenv.exe.config file as an Administrator.

Add defaultProxy tags as below, within the existing system.net tag -

<system.net>
    <defaultProxy enabled="true" useDefaultCredentials="true">
        <proxy usesystemdefault="true" bypassonlocal="true" />
    </defaultProxy>
  <settings>
    <ipv6 enabled="true"/>
  </settings>
</system.net>
  1. Restart VS.
Related Topic