Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NuGet doesn't show installed packages

I have MVC 5 project and I use NuGet to install packages. Yesterday I have installed a couple of packages, but today when I run my application I got an error of missing references. I've realized, that my project doesn't have any of references and files that were added from NuGet.I have all this packages in packages folder in my app, but no records about this packages in packages.config file. If I click Manage NuGet Packages in my solution explorer, in online search it shows me all my packages as installed, but in all installed tab it doesn't show me any of them! I didn't do anything since yesterday? What could happened and how to fix all my packages?

like image 856
Bryuk Avatar asked Dec 11 '13 19:12

Bryuk


People also ask

How do I know if a NuGet package is installed?

In Visual Studio, use the Help > About Microsoft Visual Studio command and look at the version displayed next to NuGet Package Manager. Alternatively, launch the Package Manager Console (Tools > NuGet Package Manager > Package Manager Console) and enter $host to see information about NuGet including the version.

How do I fix a missing NuGet package?

Restore NuGet packagesNavigate to Tools > Options > NuGet Package Manager > General, and then select the Allow NuGet to download missing packages check box under Package Restore. Enabling Restore NuGet Packages. In Solution Explorer, right-click the solution, and then select Restore NuGet Packages.

How do I allow NuGet to download missing packages?

To do that, go to Tools, NuGet Packaged Manager, then go to Package Manager Settings. Go to the General section, and then make sure you have a checkmark for Allow NuGet to download missing packages and also to automatically check for missing packages during the build in Visual Studio. So click on OK.


1 Answers

I have had this happen from time to time. There are two things that you can try:

  1. Right click your solution in 'Solution Explorer' and select 'Enable NuGet Package Restore'
  2. Close and Reopen VS
  3. Try Rebuild

Otherwise, just uninstall/reinstall each package.

Hope that helps!

like image 64
Bo TX Avatar answered Oct 25 '22 00:10

Bo TX