What is the best practice in the .NET world to manage transitive dependencies that cause version conflict ?
In details : Project A Depends on Project B which in turn de
There are a lot of similar questions On Stack Overflow. For e.g. Referencing 2 different versions of log4net in the same solution
Summary:
<configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="C" publicKeyToken="C's public key token" /> <codeBase version="version string for C1.0 e.g. 1.0.0.0" href="1.0\C.dll" /> <codeBase version="version string for C2.0 e.g. 2.0.0.0" href="2.0\C.dll" /> </assemblyIdentity> </dependentAssembly> </assemblyBinding> </runtime> </configuration>
you can get the public key token of C using sn -T C.dll
If v1.0 and v2.0 of C have different public key (though ideally they shouldn't) then include two dependentAssembly tags.