Resolved, download the old key version on the official website, and then redirect.
Manual reference to two versions of DLL error is due to my publickeytoken case (unexpectedly not verified ~ ~)
But I do not understand that if the reliance on a lot of words, even the PublicKeyToken are not unified, it will not be very difficult to manage it?
The following is the original problem content:
Zookeeper is used in the project, he relies on a lower version of log4net, but I want to use the higher version of the log4net.
Baidu later found that you can use the redirect assembly version to solve, but the practice found that two versions of PublicKeyToken is not the same!
What should I do about this? Can you just pull the code to regenerate one?
Try manually referencing two versions of the DLL, one with an alias.
Add dependentassembly in app. Config
<dependentAssembly> <assemblyIdentity name="log4net" publicKeyToken="1b44e1d426115821" culture="neutral" /> ??<codeBase version="1.2.10.0" href="DLL/log4net_1.2.10.dll" /> </dependentAssembly> <dependentAssembly> ??<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" /> ??<codeBase version="2.0.8.0" href="DLL/log4net_2.0.8.0.dll" /> </dependentAssembly>
Compile Time report:
Warning MSB3243: Unable to resolve "log4net, version=2.0.8.0, Culture=neutral,
PUBLICKEYTOKEN=669E0DDF0BB1AA2A "and" Log4net, version=1.2.10.0,
Culture=neutral, publickeytoken=1b44e1d426115821 "the conflict between. are at liberty to choose "Log4net,
version=2.0.8.0, Culture=neutral, publickeytoken=669e0ddf0bb1aa2a ".
Launch report:
C # Reference DLL version conflicts >> CSharp
The answer is quite clear:
Http://www.goodpm.net/postreply/csharp/1010000008923000/C References DLL version conflict. html
C # Reference DLL version conflict