Wednesday, May 21, 2014

NuGet: Uninstall a package without removing all packages that depend upon it

In my post from yesterday I mentioned that I wanted to constraint the jQuery version to 1.* inside my application. The problem was that my team was a little bit to eager and already updated to jQuery version 2.*. As a lot of packages were depending on the jQuery NuGet package, I couldn’t just tell NuGet to delete the package:

Uninstall-Package jQuery

This call would fail complaining that I have packages that depend upon it. You can still delete the package if you want to by adding the –Force command line option:

Uninstall-Package jQuery –Force

This will ignore the dependencies and just remove the jQuery NuGet package from your solution.

No comments: