Repairing/Restoring Project References

Topics: General
Apr 12, 2013 at 3:54 PM

I've only just started using NuGet, so apologies if this is simple stuff!

Is there a way of restoring all the references that were added to a project as part of the package install?

For example, I add a package, which adds a reference to 3 dlls to my project and then remove 1 of those references. Is there something that I can do that will restore the removed dll, without having to uninstall the package from the project and re-add it?

Is it just a case of adding a reference manually from the package store, because the packages.config and package restore will ensure that the dlls are there?

Thanks in advance.

Apr 14, 2013 at 7:17 AM
You can use the Update-Package -Reinstall command from the Package Manager console to restore missing dll, as well as any missing content files. Note however this command basically just does an uninstall and reinstalling under the hood.
Apr 15, 2013 at 10:41 AM
Edited Apr 15, 2013 at 10:42 AM
Thanks. That seems to be missing from the docs.

Do you know whether this is the route that people would normally take, or would they just re-add the reference from the package store?

Maybe a real (ish) worl scenario would make it clearer.

Say I install a package called SocialMedianatr which has:


When I start out, I'm only interested in sharing to Facebook, so I remove the other 3. Somewhere down the line, people actually start using Google+, so I want to re-add that dll to my project.

How would both methods work if they required the addition of Config Sections to the app.config?