I have an asp.net web forms application. It contains multiple projects and third-party dlls. One of the dlls is using log4net version 1.2.9.0 whereas other projects and dlls are using log4net version 1.2.10.0 and as a result, there is an error.
Could not load file or assembly 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I see this error when we build the application but even then my application runs perfectly.
Now I need to implement SignalR in this application. After installing the NuGet package for SignalR, I get 500 - Server Internal Error and when I go into the details of error by putting httpErrors attribute in web.config
file.
httpErrors errorMode="Custom" existingResponse="PassThrough"
I get error details on the page.
Could not load file or assembly 'log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Kindly help me resolve the issue.
I have tried resolving log4net issue by putting the following
<dependentAssembly>
<assemblyIdentity name="log4net" publicKeyToken="b32731d11ce58905" culture="neutral" />
<bindingRedirect oldVersion="1.2.9.0" newVersion="1.2.10.0" />
</dependentAssembly>"
but it did not work, probably, publicKeyToken for both versions is different
User contributions licensed under CC BY-SA 3.0