visual-studionuget

cannot load nuget feed in visual studio


I am getting the following error when I try to load nget:

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.

Also, in Linqpad, I am getting a similar error:

ServicePointManager does not support proxies with the https scheme

Does anyone have any solutions for this? I found this post, but that solution, clearing the temp folders, did not fix my problem. Please help! Thanks!


Solution

  • The ServicePointManager does not support proxies with the https scheme.

    Since you have proxy configured in the web.config, you may need to pay attention to the syntax of proxy.

    You will also get this error if you set something like this in your web.config file: proxyAddress="127.0.0.1:8888" You need list the scheme like this: proxyAddress="http://127.0.0.1:8888" (Add http://). The only scheme that is recognized by this class is http.

    Besides, since you have proxy configured in you machine, NuGet will fail to access to the server. You should add proxy settings into Nuget.Config file, goto %AppData%\NuGet\NuGet.config, add below settings:

      <config>
        <add key="HTTP_PROXY" value="http://127.0.0.1:8888" />
      </config>
    

    You can refer to the NuGet Proxy Settings for more detailed info.