NuGet Package Manager unable to load the service index

10,536

NuGet Package Manager unable to load the service index

You can try to use following ways to resolve this issue:

  • Check if you have any Windows HTTP proxy is specified, NuGet uses (if present) the HTTP Proxy specified in the environment variable http_proxy. Open "System Properties" > Advanced > Environment Variables. Find the http_proxy var (in System variables), select and delete it.
  • Check if you set something like this in your web.config file: proxyAddress="127.0.0.1:8888", if yes, remove it.
  • Delete these two nuget folders:%APPDATA%\NuGet & %LOCALAPPDATA%\NuGet, then restarted Visual Studio.

Check this thread and the similar post for some more details.

Hope this helps.

Share:
10,536
BruceK
Author by

BruceK

Updated on June 14, 2022

Comments

  • BruceK
    BruceK almost 2 years

    I am getting the following error in my NuGet Package Manager within VS 2015

    [Nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json. The ServicePointManager does not support proxies with the https scheme.

    This problem just started occurring a few days ago and it may have coincided with an update that I was forced to run but I cannot guarantee that and I do not know what the update contained. I don't even know that it was a VS update.

    I see this error on the Browse and Updates page but not the Installed page. I have spent all day reading various Stack Overflow posts and the recommended solutions either did not work or were no longer applicable. Most solutions suggested adding a new Package Source without the https but none of the sources suggested are still valid.

    I verified I am able to hit the https url from a browser and my colleague is able to use this package source also so I know the source is good.

    I have run a repair on my Visusal Studio without resolving the problem and this issue replicates for a newly created empty project so I don't think it is problem with the .csproj file.

    I have managed to download the NuGet CLI and limp along with that but I would much prefer to have the integrated functionality working.

    Actionable suggestions are greatly appreciated.

    • zivkan
      zivkan over 5 years
      ServicePointManager does not support proxies with the https scheme suggests your computer/user profile is configured to use a proxy for web requests. I don't know if new versions of .NET have fixed it, but the version of .NET that VS2015 is running as doesn't support connecting to the HTTP proxy using HTTPS. You need to reconfigure your proxy settings to talk to the proxy server over HTTP, and let the proxy talk to the rest of the internet over HTTPS.
    • BruceK
      BruceK over 5 years
      Thanks for the lead. Can you give me a little more guidance as to where I look into this. I did see several comments about Proxies but I could not find any proxy definitions in my environment variables and I don't know where to look for this config.
    • zivkan
      zivkan over 5 years
      If you're on Windows 10, press the start menu and type "proxy", the first search result should be "Change your proxy settings". If you're on an older version of Windows, it's somewhere in Internet Options (google it). Note that if you're on a work computer, you might have Group Policies setting it automatically.
    • Jim G.
      Jim G. about 4 years
  • BruceK
    BruceK over 5 years
    I tried all three suggestions above without any improvement. I did not have any proxy settings declared in my System Variables and I did not have the proxyAddress line in my web.config file. When my colleague gets in I am going to follow up on Ziv's suggestion above and see if there is some difference between their proxy settings from mine. So far I am still broken but thanks for the effort.
  • BruceK
    BruceK over 5 years
    OK, I came back to this and managed to fix my problem. I believe there is a type above. I had to delete the proxyAddress="127.0.0.1:8888" from my machine.config file and not my web.config file. I believe Fiddler may have added that line. Once I deleted that entry as well as deleting the two nuget folders and restarted VS I was working again.
  • Karl
    Karl about 5 years
    My issue was also with having a proxy entry in my machine.config. I also believe Fiddler put it there, but I don't know when (during install, or perhaps I ticked something in config). I had to remove the proxy entry and restart visual studio to get it working.