SolvedHome Package Manager Error: Unable to load the service index for source (bad proxy settings)

nuget

Following error received when searching for packages in the package manager

[nuget.org] Unable to load the service index for source https://api.nuget.org/v3/index.json.
Invalid URI: Invalid port specified.

52 Answers

✔️Accepted Answer

For me removing the .nuget folder located in C:\Users\YourNameHere fixed the problem.

Other Answers:

For me, a simple VS restart fixed the issue.

Finally I found the issue, at least in my case: if no 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.

Go for Settings ( Global Settings of your PC ) > Network and Internet > Proxy > Automatic Proxy Setup > and set Automatically detect settings to off. This Works for me.... Try this ...