6

I'm using Visual Studio Express 2013.

When trying to install a nuget package, I am getting an error (no error when trying in 2012 express):

PM> Install-Package AutoMapper
Install-Package : Unable to connect to the remote server
At line:1 char:16
+ Install-Package <<<<  AutoMapper
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Internet is working (I have Vs 2012 working and installing nuget packages at the same time - with no issues).

VS -> Tools -> Extensions and Updates says: Cannot check for updates because the following error(s) occurred whil trying to contact the server: Unable to connect to the remote server - please click here to retry the request - when I click that, it goes back to the "retrieving information" loop.

Does anyone have any ideas how to resolve this?

Thank you, Mark

Mark
  • 7,778
  • 24
  • 89
  • 147
  • Have you tried the GUI version of Nuget in VS? – Ondrej Janacek Nov 12 '13 at 10:12
  • Hi - yes - it just says "retrieving information" endlessly - thank you, Mark – Mark Nov 12 '13 at 10:13
  • 2
    Is your internet connection working? – Ondrej Janacek Nov 12 '13 at 10:14
  • 1
    Can you check if your NuGet installation is up to date? Within VS: *Tools -> Extensions and Updates -> Updates* – user247702 Nov 12 '13 at 10:14
  • Yes internet is working - Tools -> Extensions and Updates says: Cannot check for updates because the following error(s) occurred whil trying to contact the server: Unable to connect to the remote server - please click here to retry the request - when I click that, it goes back to the "retrieving information" loop. Thank you, Mark – Mark Nov 12 '13 at 10:18
  • Sounds like a firewall or a misconfigured proxy is blocking internet access for your VS 2013 installation. – user247702 Nov 12 '13 at 11:11

2 Answers2

3

I had the same problem. I was able to connect to NuGet from VS2013 if I select "Run As Administrator" when launching VS.

David
  • 31
  • 2
0

I had this exact problem and it was solved by disabling the firewall. Later I enabled the firewall and checked the blocked programs and unblocked visual studio, which for some reason had been blocked.

Action Dan
  • 443
  • 4
  • 10