I just updated my nuget packages for Common.Logging.Log4Net. Since then I keep getting the following error:
Could not load type 'Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter' from assembly 'Common.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e'
Here is a list of each nuget package that is linked to Common.Logging as well as version:
- Common.Logging - 2.2.0
- Common.Logging.Core - 2.2.0
- Common.Logging.Log4Net - 2.0.1
In my web.config I have the following bit:
<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>
How can I fix this?
I've tried changing:
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net">
to (added version of the Common.Logging.Log4net.dll [201])
<factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net201">
and that didn't work.
LogManager.GetCurrentClassLogger()- Mark