[SOLVED] How to find incompatible references in a solution?

Issue

I’ve inherited a giant solution with lots of projects. Each of these projects references a good number of old school DLL assemblies, Nuget packages, etc… Some of the references are of different versions. For instance, I got Newtonsoft.Json v8.x, 9.x, 10.x. So as you can imagine the build generates a myriad of warnings and the web.config files have a ton of binding redirects.

I really want to clean all this up. Is there a way for Visual Studio (or some other tool) to identify same references that are from different versions?

Solution

For the NuGet packages you can use Consolidate in Visual Studio.
Right-click on the solution and choose ‘Manage NuGet Packages for Solution…’.

With ‘Install’ the latest version will be installed in all the selected projects.

enter image description here

Answered By – Bob Lokerse

Answer Checked By – Terry (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *