I\'ve got a VS2017 project that compiles to a DLL which is then called by an EXE written by someone else. Both projects target .Net Framework 4.6.2. I rewrote one of my DLL
In my solution I found 2 different trouble maker. Either in the App.config or Web.config file:
Version mismatch: The version installed via NuGet did not match the version in the config file. Solution: Change the version manually in the .config file.
Duplicate entries: I found duplicate entries for ValueTuple. In my case one for 4.0.3.0 and another one for 4.5.0. Removing the older entry solved the issue.
In another case I managed to fix the issue by removing unneeded references and getting rid of the ValueTuple NuGet package altogether.