Mar*_*ark 2 log4net nuget common.logging
我刚刚更新了我的nuget包Common.Logging.Log4Net
.从那时起,我不断收到以下错误:
无法从程序集'Common.Logging,Version = 2.2.0.0,Culture = neutral,PublicKeyToken = af08829b84f0328e'加载类型'Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter'
以下是链接到的每个nuget包的列表Common.Logging
以及版本:
在我的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>
Run Code Online (Sandbox Code Playgroud)
我怎样才能解决这个问题?
我试过改变:
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
Run Code Online (Sandbox Code Playgroud)
to(添加版本的Common.Logging.Log4net.dll [201])
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net201">
Run Code Online (Sandbox Code Playgroud)
那不起作用.
所以我找到了问题的答案,并想与遇到同样问题的人分享答案.
看起来介于两者之间Common.Logging 2.1.2
,Common.Logging 2.2.0
开发人员进行了更改以创建新库Common.Logging.Core
.Common.Logging.Log4Net
根据Common.Logging开发(GitHub)站点,该软件包尚未更新以支持新的更改.
Common.Logging
他的BaseSpace项目的2.1.2版本:https://github.com/basespace/basespace-csharp-sdk/pull/8 归档时间: |
|
查看次数: |
3557 次 |
最近记录: |