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?
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.
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.
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.
I have had this happen from time to time. There are two things that you can try:
Otherwise, just uninstall/reinstall each package.
Hope that helps!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With