我刚刚更新了我的 nuget 包Common.Logging.Log4Net
。从那时起,我不断收到以下错误:
无法从程序集“Common.Logging,版本=2.2.0.0,文化=中性,PublicKeyToken=af08829b84f0328e”加载类型“Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter”
以下是链接到的每个 nuget 包的列表Common.Logging
以及版本:
- Common.Logging - 2.2.0
- Common.Logging.Core - 2.2.0
- Common.Logging.Log4Net - 2.0.1
在我的 web.config 我有以下位:
<configuration>
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
//...//
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Common.Logging" publicKeyToken="af08829b84f0328e" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.2.0.0" newVersion="2.2.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
//...//
<common>
<logging>
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
<arg key="configType" value="FILE-WATCH" />
<arg key="configFile" value="~/log4net.config" />
</factoryAdapter>
</logging>
</common>
</configuration>
我怎样才能解决这个问题?
我试过改变:
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
到(Common.Logging.Log4net.dll [201] 的添加版本)
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net201">
那没有用。