Assembly A references log4net 1.2.10.0 while Assembly B references log4net 2.0.8.0
The manifest of assembly A is as below:
I'm getting below exception at run-time as Assembly A can't find the assembly.
System.IO.FileLoadException: Could not load file or assembly 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115821'
I've tried below options and no luck.
Added binding redirection in app.config as below. [solution 1 in first link below]
Copied assemblies to different folders and used to load them side-by-side. [solution 3 in first link below]
References used:
how-to-resolve-net-reference-and-nuget-package-version-conflicts
how-exactly-does-the-specific-version-property-of-an-assembly-reference-work-i
how-do-i-redirect-assembly-binding-to-the-current-version-or-higher
User contributions licensed under CC BY-SA 3.0