问题
I installed Easygelf.log4net package for log4net version 1.2.0.13 but I am getting error
Could not load file or assembly 'log4net, Version=1.2.13.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I tried adding the below to the web.config but no luck
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="669e0ddf0bb1aa2a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-1.2.13.0" newVersion="1.2.13.0" />
</dependentAssembly>
回答1:
Check assembly version that is referenced in the project and change old version and new version accordingly. I was also getting same error, and my project was using 1.2.15.0 . so I changed assembly mapping information-
来源:https://stackoverflow.com/questions/32460660/could-not-load-file-or-assembly-log4net-or-one-of-its-dependencies