Force Nuget to download all packages again

Hello,
If Nuget isn't restoring the packages correct, we have a problem because we have a depedency to Nuget.
If you have a project where some references from nuget are missing and the option "restore nuget packages" is not available, here is a maybe dirty but working solution.
First make sure that "Allow NuGet to download missing packages" and "Atuomatically check for missing packages during build in Visual Studio" are checked.

clip_image001
After this, make sure that the "package.config" file contains the all the references you need for your project.
To force Nuget to download all the libaries agaiin, delete the "packages" folder in the root path of your solution.
Now rebuild your solution.


Now Nuget should download all the packages again.


Posted Aug 22 2014, 01:20 PM by Holger Vetter

Comments

Denis wrote re: Force Nuget to download all packages again
on 11-15-2016 11:38

Very good ,THANK YOU !

Jesper wrote re: Force Nuget to download all packages again
on 12-08-2016 12:25

Thank you! Worked PERFECT!

Shimmy wrote re: Force Nuget to download all packages again
on 03-26-2017 8:23

Thanks for sharing

developers.de is a .Net Community Blog powered by daenet GmbH.