0

I have a .NET projects solution big enough to have problems with nuget packages versions interference. One project contains assembly that depends on old Newtownsoft.JSON library version, another project uses assembly, that needs newer version of this library.

I know that it looks like there is no way to resolve it, but my question is not about this. I face with wrong assembly version problem at runtime, when a method from my second assembly is called and I get an exception because of this.

So, is there any tool or Visual Studio option to check if there are any assemblies with incompatible versions of their dependencies in the solution? It would be cool if such tool might help with the resolution also.

FLCL
  • 2,445
  • 2
  • 24
  • 45

1 Answers1

1

is there any tool or Visual Studio option to check if there are any assemblies with incompatible versions of their dependencies in the solution?

I am afraid the answer is no, because NuGet itself can do this task well. When you install any package via NuGet which have any assemblies with incompatible versions of their dependencies in the solution, NuGet will prompt that "There was a conflict between...".

Besides, can try to change the "MSBuild project build output verbosity" to "Detailed" or above to check the detail error log. To do this by Tools -> Options...->Projects and Solutions->Build and Run. Set the MSBuild project build output verbosity level to Detailed or above. Build the project and checkout the error log in the output window. It will show detailed info about incompatibility, then just pick the appropriate version to use.

Consider app.config remapping of assembly with no app.config mapping

Leo Liu
  • 71,098
  • 10
  • 114
  • 135
  • Detailed log is hard to read. It has so much irrelevant information that finding what version of an assembly should be chosen is mission impossible. Is there a tool that would display a tree of all referenced dependencies showing the version numbers and ideally highlighting issues? – Alex Apr 28 '20 at 21:46