Visual Studio/C#: Nuget Unable to connect to remote server

Clearing HTTP_PROXY worked for me.

Let me fix it myself

Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756 How to back up and restore the registry in Windows

To reset your Internet Explorer proxy settings yourself, follow these steps:

  1. On Windows XP, click Start, or on Windows Vista or Windows 7, click , and then click Run. On Windows 8 or Windows 8.1, to access the Run command, press the Windows logo key Windows logo key + R. Or, swipe in from the right edge of the screen, and then tap Search (or if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search). Type Run in the search box, and then tap or click Run.
  2. In the Run text box, copy (CTRL+C) and paste (CTRL+V) or type the following: reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
  3. Click OK.
  4. On Windows XP, click Start , or on Windows Vista or Windows 7, click , and then click Run. On Windows 8 or Windows 8.1, to access the Run command, press the Windows logo key Windows logo key + R. Or, swipe in from the right edge of the screen, and then tap Search (or if you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, and then click Search). Type Run in the search box, and then tap or click Run.
  5. In the Run text box, copy (CTRL+C) and paste (CTRL+V) or type the following: reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f
  6. Click OK.

From http://support.microsoft.com/kb/2289942 Thanks @Sandy


Solved. that's because Visual studio is using fiddler http connection.

all you have to do is to open fiddler=> fiddler option => connection => uncheck "act as system proxy on startup".

thats all!


This started happening to me quite randomly today on Visual Studio 2012. A bit simplistic but, after checking if the Nuget site itself was up and trying the Package Manager Console, my solution was to:

Close and reopen Visual Studio

Suddenly it could connect to the Nuget server again and download my much needed packages.

Tags:

Nuget