Reputation: 1556
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.
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?
Upvotes: 42
Views: 58814
Reputation: 1
First, run this in the package manager console.
[Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12
Now try this version:
NuGet\Install-Package AjaxControlToolkit -Version 20.1.0
Upvotes: 0
Reputation: 11
TOOLS --> nuGet Package Manager --> Package Manager Console
then copy that [Net.ServicePointManager]::SecurityProtocol=[Net.ServicePointManager]::SecurityProtocol-bOR [Net.SecurityProtocolType]::Tls12
press enter.
try again, it works
Upvotes: 1
Reputation: 4596
https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/
Open command prompt as administrator in windows 10
Run following commands
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v DisabledByDefault /t REG_DWORD /d 0 /f /reg:64
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:32
reg add "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client" /v Enabled /t REG_DWORD /d 1 /f /reg:64
Nuget will start working
Upvotes: 0
Reputation: 31
As described on the 'Deprecating TLS 1.0 and 1.1 on NuGet.org' page.
https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/
I've added the following 2 entries to the registry and the nuget package manager started working again:
reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:64
reg add HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319 /v SystemDefaultTlsVersions /t REG_DWORD /d 1 /f /reg:32
Upvotes: 3
Reputation: 31
I had the same issue. Opening "Package Manager Console" (View->Other Windows->Package Manager Console) worked for me.
Upvotes: 3
Reputation: 947
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!
Upvotes: 47
Reputation: 494
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/
Upvotes: 7
Reputation: 99
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.
Upvotes: 0
Reputation: 11
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
Control Panel -> Advanced system settings -> Environment Variables
Find http_proxy and delete it.
Open Visual Studio and TOOLS -> NuGet Packages Manager -> NuGet Package Manager for solution...
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)
Upvotes: 0
Reputation: 20063
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.
Upvotes: 0
Reputation: 121
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.
Upvotes: 1
Reputation: 506
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.
Upvotes: 38
Reputation: 806
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
Upvotes: 2
Reputation: 63
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.
Upvotes: 1