I have a DLL project called "Foo" that references Newtonsoft.Json 4.0.7. And I have a second DLL project called "Bar", referencing "Foo" and referencing Newtonsoft.Json 4.0.5. And for various reasons its impossible to change the version of Newtonsoft.Json of both.
When I compile this, I get this warning in the Bar project:
warning MSB3247: Conflicts between different versions of the same dependent assembly were detected.
So, I created app.config in the "Bar" of the project:
<dependentAssembly> <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30AD4FE6B2A6AEED" culture="neutral"/> <bindingRedirect oldVersion="0.0.0-4.0.7" newVersion="4.0.5"/> </dependentAssembly>
But that did not stop the warning.
An interesting point is that when I change the project "Bar" from the DLL to the console, the warning disappears. Therefore, I assume that redirection only works for executable files.
How can I get rid of this warning in my script?
source share