Could not load file or assembly 'log4net,or on

2019-09-10 12:56发布

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条回答
Fickle 薄情
2楼-- · 2019-09-10 13:46

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-

查看更多
登录 后发表回答