38
votes

Strange issue I've had for the past few weeks. Running Windows 8 with Visual Studio 2013 Premium Ed. with Update 1. NuGet package manager within Visual Studio simply doesn't work. I've uninstalled/reinstalled it. I've updated my local NuGet.exe (was running 2.5, now 2.8.5) - made sure to include as a path variable. Even from the console, I can't install or update any packages. Console is confirmed running 2.8.50313.46.

From the manager, it simply loops the progress bar repeatedly displaying "Retrieving information..". Nothing displays for Updates or Online. From the Installed Packages, I can see everything within my solution with no problem.

enter image description here

Running as administrator as this post suggests for VS 2013 Express doesn't work either. Another post found it was a nuget.org issue, but in my case my colleagues can access nuget.org from within the package manager (same network) with no issues. Edit: I've also removed the suo files from my solution before opening it up on Visual Studio.

Any ideas on how to fix this?

10
Checking VS2013 logs would be one of the steps towards your solution, another step would be to check the extension and updates windows too see if nuget needs an updatecsharpwinphonexaml
I see you have a couple of other Nuget package sources there. I've noticed the package manager will wait until it has data from all package sources before becoming available. Is it possible one of those other sources is taking a really long time to load?Steven V
Good points. I'll try them both out and report.osij2is
Disabled the other packages sources (nuget.org was only one active). No change. Will check VS2013 logsosij2is

10 Answers

37
votes

I had the same issue. Uninstalling NuGet, restarting VS2013, then installing NuGet again worked for me.

You can do this in VS by going to Tools -> Extensions and Updates.

29
votes

Seems like nuget.org removed support for default TLS version (1.1).

Run this command in NuGet command control (PM) to use version 1.2:

[Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12

However, it seems like a non-permanent solution, so after restarting Visual Studio, you need to run command again. Too bad.

Please notify if/when you find permanent solution!

5
votes

I have tried the other suggestions where they pertain to me (e.g. reinistalling package manager) but these didn't work. Strangely, just removing (unchecking) all package sources for Nuget Package Manager (Tools -> Options -> Nuget Package Manager -> Package Sources), clicking OK, then re-adding them fixed the problem.

For me when adding the nuget package manager new I added the following: https://www.nuget.org/api/v2/

2
votes

I had the same issue, and it was related to proxy settings behind my companies firewall.

You can find the file C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.exe.config

VS update 4 seemed to remove them, not sure why. Further details here: Visual Studio 2013 Update 4 - Tools and Extensions Not reaching the internet

1
votes

I had the same experience and mine was due to the fact that I was running a http debugger(fiddler) at the time. I killed the fiddler and restart the Visual Studio and it worked.

1
votes

Please take a look at NuGet Behind Proxy.

In few words you should put

<configuration>
    <config>
        <add key="http_proxy" value="http://my.proxy.address:port" />
        <add key="http_proxy.user" value="mydomain\myUserName" />
        <add key="http_proxy.password" value="base64encodedHopefullyEncryptedPassword" />
    </config>
</configuration>

to NuGet.config that could be found at c:\Users\<your name>\AppData\Roaming\NuGet\ (or current .nuget dir, see http://skolima.blogspot.ru/2012/07/nuget-proxy-settings.html).

This can be done by running the following commands:

nuget.exe config -set http_proxy=http://my.proxy.address:port
nuget.exe config -set http_proxy.user=mydomain\myUserName
nuget.exe config -set http_proxy.password=mySuperSecretPassword

against c:\Users\<your name>\AppData\Roaming\NuGet\NuGet.exe

Actually only password should be set via command, other parameters you can just put into file. Also you can ommit passw, then nuget will ask you when needed.

1
votes

I had the same issue. Opening "Package Manager Console" (View->Other Windows->Package Manager Console) worked for me.

0
votes

This happened to me when I added a NuGet v3 custom repository URL to 2013 (which I guess uses v2).

Once I had configured it to use the v2 URL I was good to go.

0
votes

I had the same problem and I found a solution that fixed the issue. If no Windows http proxy is specified, then Nuget uses the environnement variable http_proxy.

If you want to know your proxy settings, open a prompt as administrator and hit this command:

netsh winhttp show proxy

Source: Show proxy setting

  1. Control Panel -> Advanced system settings -> Environment Variables

  2. Find http_proxy and delete it.

  3. Open Visual Studio and TOOLS -> NuGet Packages Manager -> NuGet Package Manager for solution...

  4. Select Online on the left side and you will finally see the online list.

Source post: Unable to load the service index for source (bad proxy settings)

0
votes

In my case, i had a couple of other NuGet package sources there with nuget.org, I have just removed other than nuget.org. by clicking setting on left down corner and unchecked all except nuget.org and now it is working fine.