Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install packages with NuGet - 500 internal server error

This makes no sense to me. NuGet was working fine before but now it is throwing a server error when I try to install packages. I've uninstall and reinstall NuGet with the latest, but still no luck.

PM> Install-Package EntityFramework
Install-Package : The remote server returned an error: (500) Internal Server Error.
At line:1 char:16
+ Install-Package <<<<  EntityFramework
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand

Has anyone seen anything like this? Thanks.

I'm pointed at https://nuget.org/api/v2/ which seems to be live...

like image 827
jocull Avatar asked Apr 12 '12 19:04

jocull


People also ask

How do I force a NuGet package to Install?

Switch to the Browse tab, search for the package name, select it, then select Install). For all packages, delete the package folder, then run nuget install . For a single package, delete the package folder and use nuget install <id> to reinstall the same one.

How do I enable manage NuGet packages in Visual Studio?

Starting in Visual Studio 2017, NuGet and the NuGet Package Manager are automatically installed with any . NET-related workloads. Install it individually by selecting the Individual components > Code tools > NuGet package manager option in the Visual Studio installer.


2 Answers

Happened to me too.

Try this:

  1. Run VS in admin mode.
  2. Uninstall NuGet from Tools->Extension Manager (Extensions and Updates in VS 2015)
  3. Delete everything in short %AppData%\NuGet or full-named C:\Users\[YourUsername]\AppData\Roaming\NuGet
  4. Reinstall NuGet
like image 120
log4code Avatar answered Sep 17 '22 11:09

log4code


From NuGetTeam (@nuget) on Twitter https://twitter.com/#!/nuget

We are investigating an issue on the NuGet Gallery servers. We will provide an update shortly. We apologize for the inconvenience.

like image 33
Matija Grcic Avatar answered Sep 21 '22 11:09

Matija Grcic