Visual Studio / C #: Nuget Cannot Connect to a Remote Server

In MS Visual studio, I am trying to install Nuget packages in my solution.

When I select the option "Manage Nuget packages for solution" and try to install the package, I get the message "Unable to connect to the remote server."

I have an internet connection, so I don’t understand why I always get this message.

Does anyone know of some steps that can be taken to resolve this issue?

thank

+50
nuget
Jul 19 2018-12-12T00:
source share
16 answers

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 can occur if you modify the registry incorrectly. Therefore, make sure that you carefully follow these steps. For added protection, back up the registry before modifying it. Then you can restore the registry if a problem occurs. For more information about backing up and restoring 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 Internet Explorer proxy settings, follow these steps. Steps:

  • In Windows XP, click the Start button, or in Windows Vista or Windows 7, click, and then click Run. In Windows 8 or Windows 8.1, to access Run, press the Windows logo key. A key with the Windows + R logo. Or, swipe the screen to the right edge of the screen, and then click Search (or if you use a mouse, point to the upper right corner of the screen, move the mouse pointer down, and then click Search). Type Launch in into the search box, and then click or the Run button.
  • 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
  • Click OK.
  • In Windows XP, click the Start button, or in Windows Vista or Windows 7, click, and then click Run. In Windows 8 or Windows 8.1, to access Run, press the Windows logo key. A key with the Windows + R logo. Or, swipe the screen to the right edge of the screen, and then click Search (or if you use a mouse, point to the upper right corner of the screen, move the mouse pointer down, and then click Search). Type Launch in into the search box, and then click or the Run button.
  • 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
  • Click OK.

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

+42
Mar 23 '13 at 15:45
source share

solved. because Visual Studio uses the fiddler http connection.

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

thats all!

+36
Jan 19 '14 at 16:53
source share

It started with me quite by accident today at Visual Studio 2012. It’s a bit simplified, but after checking that the Nuget site itself went up and tried the package manager console, my solution was as follows:

Close and reopen Visual Studio

Suddenly, he will again be able to connect to the Nuget server and download my necessary packages.

+21
Mar 19 '14 at 17:02
source share

Tools β†’ Library Package Manager β†’ Package Manager Settings β†’ Clear Package Cache

It worked for me

+11
Jun 13 '13 at 10:04 on
source share

Flushing proxy cache in IE. This is fixed for me. Use these two commands on the command line (run as administrator)

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f 

then

 reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f 

Details can be found at https://support.microsoft.com/en-us/kb/2289942

+5
May 26 '15 at 11:47
source share

I decided it on mine by commenting

 <system.net></system.net> 

from devenv.exe.config located in

 C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.config 
+4
Dec 12 '14 at 4:02
source share

Here's how I fixed this problem after none of the above suggestions worked:

Internet Explorer> Tools> Connections> Lan Settings
Uncheck "Automatically detect settings." This solved the Nuget Package Manager problem for me. In addition, he fixed another connection problem that I encountered with the VMWare virtual desktop AND ... it significantly increased the speed in Internet Explorer when trying to connect to secure sites.

+2
Nov 07 '15 at 22:29
source share

I had a problem restoring VS 2010 package, even after upgrading Nuget Package Manager to the latest version, and also without selecting all the packages available to me. I received an error message when enabling the Nuget package recovery option in the solution.

I solved this using another field that did not restrict HTTPS access to the nuget server. When I used VS 2012 from another window to enable package recovery, it worked fine. I believe that he should be able to connect to the nuget online server to download the latest nuget.exe used during recovery operations. Thus, one of the options that you can use is to execute the Enable Package Restore process from a server that has all the necessary Internet resources, and then register the changes. After these changes are verified, you can download the solution again from VS 2010 or VS 2012 and use the nuget recovery options.

Hope this helps!

+1
Mar 04 '14 at 23:42
source share

I had the same symptoms, and apparently the visual studio used the proxy setting configured in IE. It turned out that my problem was one of the following:

  • My IE was updated to IE 9, but the update was not completed because I did not finish the update wizard
  • Some obscure proxy settings were installed in IE (the rest of the RC Selene test run)

After completing the update wizard and clearing all proxy settings, my NuGet package manager works again.

0
Nov 14 '13 at 21:18
source share

If the same problem, it was specific to the solution, and none of the above problems worked. I deleted the visual studio custom solution parameter file (.suo) and restarted VS 2013, and now I can update and install the packages again.

0
01 Oct '14 at 20:26
source share

Finally allowed. I disabled the extension in Chrome. I installed it to hide my real location.

0
Dec 04 '14 at 5:36
source share

To reset your Internet Explorer proxy settings, do the following: 1. In Windows XP, click the "Start" button or in Windows Vista or Windows 7, click

2459687, and then click Run. In Windows 8 or Windows 8.1, to access the Run command, press the Windows logo key

Windows + R logo. Or, drag your finger along the right edge of the screen and then click β€œSearch” (or, if you are using a mouse, point to the upper right corner of the screen, move the mouse down, and then click β€œSearch”). Type Start in the search box, and then click or 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. In Windows XP, click the Start button, or in Windows Vista or Windows 7, click

2459687, and then click Run. In Windows 8 or Windows 8.1, to access the Run command, press the Windows logo key

Windows + R logo. Or, swipe the screen from the right edge of the screen, and then click "Search" (or, if you use a mouse, point to the upper right corner of the screen, move the mouse down, and then click "Search"). Type Start in the search box, and then click or click Run. 5. In the "Run" field, copy (CTRL + C) and paste (CTRL + V) or enter the following: reg delete "HKCU \ Software \ Microsoft \ Windows \ CurrentVersion \ Internet Settings" / v ProxyServer / f

6. Click OK.

0
Dec 19 '14 at 19:00
source share

I could not establish globalization in VS 2015 and after I tried all the answers, I tried this. I opened my project in VS 2013, and it worked for the first time. hope this helps someone else

0
Nov 03 '15 at 18:51
source share

Restarting the modem fixed my problem.!

0
Nov 04 '15 at 11:29
source share

Internet Properties -> LAN Settings -> Uncheck "Automatically Detect Settings"

-one
Apr 21 '13 at 17:08
source share

Steps:

  • Close Fiddler.
  • Restart Visual Studio.
-2
Jun 03 '15 at 6:32
source share



All Articles