2014-07-25 2 views
2

방금 ​​Common.Logging.Log4Net에 대한 내 너트 패키지를 업데이트했습니다. 2.2.0 'Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter'유형을로드 할 수 없습니다.

  • -

    • Common.Logging : Common.Logging뿐만 아니라 버전에 연결되어 각 nuget 패키지의 목록은 다음

      Could not load type 'Common.Logging.Factory.AbstractCachingLoggerFactoryAdapter' from assembly 'Common.Logging, Version=2.2.0.0, Culture=neutral, PublicKeyToken=af08829b84f0328e'

      되어 그 이후로 나는 다음과 같은 오류가 계속 Common.Logging.Core - 2.2.0

    • Common.Logging.Log4Net - 내가 가진 내 Web.config의에서 2.0.1

    다음 비트 :

    <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"> 
    

    <factoryAdapter type="Common.Logging.Log4Net.Log4NetLoggerFactoryAdapter, Common.Logging.Log4net201"> 
    

    합니다 (Common.Logging.Log4net.dll [201]의 추가 버전)에 그 작동하지 않았다.

  • +0

    이 오류는'LogManager.GetCurrentClassLogger()'를 호출 할 때 발생합니다. – Mark

    답변

    5

    내 질문에 대한 답변을 찾았으며 같은 문제가 발생하는 사용자와 답변을 공유하고 싶습니다.

    Common.Logging 2.1.2Common.Logging 2.2.0 사이에있는 개발자는 개발자가 새로운 라이브러리 Common.Logging.Core을 만들기 위해 변경되었습니다. Common.Logging.Log4Net 패키지는 Common.Logging development (GitHub) 사이트에 따라 새 변경 사항을 지원하도록 업데이트되지 않았습니다.

    0

    또 다른 지점 수도 : https://github.com/basespace/basespace-csharp-sdk/pull/8

  • TypeLoadException이이 기록 된 문제로 설명 어떤 사람들을 돕기 :

    Common.Logging 3.0부터 개발자는 버전 종속성을 처리하는 방법을 변경했습니다. 예를 들어, 어셈블리 Common.Logging.Log4Net은 더 이상 지원되지 않으면 각 프레임 워크에 버전 별 참조가 필요합니다. 따라서 Common.Logging.Log4Net의 경우 최신 내용은 Common.Logging.Log4Net1213입니다. nuget를 사용

    , 당신은 이것을 얻을 수 :

    Install-Package Common.Logging.Log4Net1213 
    

    자세한 내용은 here를 찾을 수 있습니다.