Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find incompatible references in a solution?

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?

like image 305
AngryHacker Avatar asked Feb 26 '19 02:02

AngryHacker


1 Answers

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

like image 114
Bob Lokerse Avatar answered Oct 08 '22 15:10

Bob Lokerse