Consolidate the NuGet Packages in your Solution

As a .Net developer you use NuGet packages daily: You add them to projects and can use the functionality they offer without much effort. Adding those packages is one thing, updating them another. Especially with solutions containing many projects it’s common to forget one or another package. There is a simple solution to that problem: Solution wide management of NuGet packages.

This feature is a great time safer but unfortunately not placed where you usually manage your NuGet packages in the Solution Explorer. Instead of the References entry in your project you make a right click on the solution to open the context menu:

Click on “Manage NuGet Packages for Solution…” to open a slightly extended dialog to manage your NuGet packages:

Browse, Installed and Updates work like the menus in the “default” NuGet packages dialog but contain all projects of this solution.

The big addition is the Consolidate tab. Here you can see which NuGet packages are installed in different versions. One single click on the Install button is all it takes to consolidate the different versions to the one you specified. This works for updates as well as for downgrades, should you run into problems with the newest version.

This feature was introduced in Visual Studio 2013 and is in 2017 part of the Community Edition. You should therefore find this time safer ready to use in your Visual Studio.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.