nugetlog4netcommon.logging

Could not load type 'Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter'


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:

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.


Solution

  • So I've found the answer to my question and wanted to share the answer with anyone experiencing the same issue.

    It looks like between Common.Logging 2.1.2 and Common.Logging 2.2.0 the developer made a change to create a new library Common.Logging.Core. The Common.Logging.Log4Net package hasn't been updated to support the new change according to the Common.Logging development (GitHub) site.