2
votes

I'm trying to install SignalR in my C# project, but all I get when running install-package Microsoft.AspNet.SignalR is:

The source at nuget.org [https://www.nuget.org/api/v2/] is unreachable. Falling back to NuGet Local Cache(...) At line:1 char:1 + install-package Microsoft.AspNet.SignalR + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

This error was posted to Stack Overflow a few times, but no solution has worked for me. I've tried:

  • Starting a new project
  • Removing and adding all of my nuget sources
  • Trying nuget with projects where it worked
  • Reinstalling nuget
  • Reinstalling Visual Studio

Nothing worked. I can reach nuget.org just fine from my browser.

I would appreciate some help.

2
Have you tried a ipconfig/flushdns?Matías Fidemraizer
@MatíasFidemraizer yes. Did not help.Nekkoru
Does this happen always? I mean, everytime you try to use NuGet you get this issue..Matías Fidemraizer
@MatíasFidemraizer it worked fine on Thursday. Stopped working today.Nekkoru

2 Answers

2
votes

Try using the UI. For me the UI works fine but the Package Manager needs to be told explicitly where the source is. Try the command:

install-package Microsoft.AspNet.SignalR -Source nuget.org

0
votes

To work around this, you can run nuget install Microsoft.AspNet from the command line in your solution root. Then when you try again in the Package Manager it will find the cached copy and succeed:

.nuget\NuGet.exe install Microsoft.AspNet.SignalR.Client -OutputDirectory packages