2012-09-28 5 views
2

common.logging.log4net을 nuget을 통해 visual studio 2012 솔루션에 추가했습니다.common.logging - 응용 프로그램 구성 파일에서 리디렉션을 찾았습니다.

common.logging.log4net ver. - 2.0.1 common.logging ver. - 2.0.0 log4net - ver. 내가 빌드 할 때 1.2.10

는/로컬로 실행, 나는 브라우저를 통해 다음과 같은 예외를 참조하십시오

파일이나 어셈블리 'Common.Logging'또는 종속성 중 하나를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의가 과 일치하지 않습니다. (HRESULT 예외 : 0x80131040) 설명 : 현재 웹 요청 실행 중에 처리되지 않은 예외가 발생했습니다. 오류에 대한 정보와 코드에서 오류가 발생한 위치에 대한 정보는 에 대한 스택 추적을 검토하십시오.

예외 정보 : System.IO.FileLoadException : 파일 또는 어셈블리 'Common.Logging'또는 해당 종속성 중 하나를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의가 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)

스택 추적 :

[FileLoadException는 'Common.Logging' 또는 해당 종속성 중 하나를 파일 또는 어셈블리를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의 이 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040 )]

[FileLoadException 'Common.Logging, 버전 2.1.1.0 = 중성 문화 = PublicKeyToken = af08829b84f0328e'또는 종속성 한 파일 또는 어셈블리를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의 이 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040 )] System.Reflection.RuntimeAssembly._nLoad ( 의 AssemblyName 파일 이름, 문자열 코드베이스 증거 assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr, 부울 throwOnFileNotFound 부울 forIntrospection 부울 suppressSecurityChecks) + 0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName ( 의 AssemblyName assemblyRef, 증거 assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr 부울 throwOnFileNotFound 부울 forIntrospection 부울 suppressSecurit yChecks) +210
System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString, 증거 assemblySecurity, StackCrawlMark & stackMark, 을 IntPtr pPrivHostBinder 부울 forIntrospection) 242
System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString, 증거 assemblySecurity , StackCrawlMark & stackMark, 부울 forIntrospection) +17 System.Reflection.Assembly.Load (문자열 assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper (문자열 의 AssemblyName, 부울 starDirective) 122

그것은이로드되지 않기 때문에 그것을 찾을 수 없습니다 Common.Logging 버전 = 2.1.1.0, 찾고 있습니다. 이제 응용 프로그램을 디버깅 할 때 약간 다른 다음 예외가 표시됩니다.

LOG :이 바인딩은 기본로드 컨텍스트에서 시작됩니다.

LOG : 응용 프로그램 구성 파일을 사용하여 : C : \ 작업 공간 \ FTM \ APPS \ TM \ TM.Web \ Web.config의

LOG : 사용 호스트 구성 파일 : C : \ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \

aspnet.config LOG : C에서 컴퓨터 구성 파일을 사용하여 : \ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \ 설정 \ machine.config에.

LOG : 정책이 현재 참조에 적용되지 않습니다 (개인, 사용자 정의, 부분 또는 위치 기반 어셈블리 바인드).

LOG : 새 URL 파일의 다운로드를 시도 : /// C : /Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET 파일/루트/e97e0952/56ab271f/Common.Logging.DLL .

LOG : 새 URL 파일의 다운로드를 시도 : /// C : /Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET 파일/루트/e97e0952/56ab271f/Common.Logging/Common.Logging.DLL.

로그 : 새 URL 다운로드 시도 중 파일 : /// C : /Workspaces/FTM/Apps/TM/TM.Web/bin/Common.Logging.DLL.

LOG : 응용 프로그램 구성 파일을 사용하여 : C : \ 작업 공간 \ FTM \ APPS \ TM \ TM.Web \ Web.config의

LOG : 사용 호스트 구성 파일 : C : \ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319 \ aspnet.config

로그 : C : \ Windows \ Microsoft.NET \ Framework64 \ v4.0.30319 \ config \ machine.config의 컴퓨터 구성 파일을 사용하십시오.

LOG : 응용 프로그램 구성 파일에 리디렉션이 있음 : 2.0.0.0 이 2.1.1.0으로 리디렉션되었습니다.

LOG : 포스트 - 정책 참조 : Common.Logging, 버전 = 2.1.1.0, 문화 = 중립, PublicKeyToken = af08829b84f0328e

LOG : 새 URL 파일의 시도 다운로드 : /// C :/윈도우 /Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET 파일/root/e97e0952/56ab271f/Common.Logging.DLL.

LOG : 새 URL 파일의 다운로드를 시도 : /// C : /Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET 파일/루트/e97e0952/56ab271f/Common.Logging/Common.Logging.DLL.

로그 : 새 URL 다운로드 시도 중 파일 : /// C : /Workspaces/FTM/Apps/TM/TM.Web/bin/Common.Logging.DLL.WRN : 어셈블리 이름을 비교하여 불일치가 발생했습니다. 부 버전 ERR : 어셈블리 설치를 완료하지 못했습니다 (hr = 0x80131040). 검사 중 이 종료되었습니다.

스택 추적 :

[FileLoadException는 'Common.Logging' 또는 해당 종속성 중 하나를 파일 또는 어셈블리를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의 이 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040 )]

[FileLoadException 'Common.Logging, 버전 2.1.1.0 = 중성 문화 = PublicKeyToken = af08829b84f0328e'또는 종속성 한 파일 또는 어셈블리를로드 할 수 없습니다. 위치한 어셈블리의 매니페스트 정의 이 어셈블리 참조와 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040 )] System.Reflection.RuntimeAssembly._nLoad ( 의 AssemblyName 파일 이름, 문자열 코드베이스 증거 assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr, 부울 throwOnFileNotFound 부울 forIntrospection 부울 suppressSecurityChecks) + 0
System.Reflection.RuntimeAssembly.InternalLoadAssemblyName ( 의 AssemblyName assemblyRef, 증거 assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark & stackMark, pPrivHostBinder을 IntPtr 부울 throwOnFileNotFound 부울 forIntrospection 부울 suppressSecurit yChecks) +210
System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString, 증거 assemblySecurity, StackCrawlMark & stackMark, 을 IntPtr pPrivHostBinder 부울 forIntrospection) 242
System.Reflection.RuntimeAssembly.InternalLoad (문자열 assemblyString, 증거 assemblySecurity , StackCrawlMark & stackMark, 부울 forIntrospection) 17 System.Reflection.Assembly.Load (문자열 assemblyString) +35
System.Web.Configuration.CompilationSection.LoadAssemblyHelper (문자열 의 AssemblyName, 부울 starDirective) 122

[ConfigurationErrorsException : Common.Logging, Version = 2.1.1.0, Culture = neutral, PublicKeyToken = af08829b84f0328e '또는 그 종속성 중 하나를 파일 또는 어셈블리를로드 할 수 없습니다. 어셈블리의 매니페스트 정의에 일치하는 어셈블리 참조가 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)]
System.Web.Configuration.CompilationSection.LoadAssemblyHelper (문자열 의 AssemblyName 부울 starDirective) 12,761,078
System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory() 503 System.Web.Configuration .AssemblyInfo.get_AssemblyInternal() 142 System.Web.Compilation.BuildManager.GetReferencedAssemblies (CompilationSection compConfig) 334
System.Web.Compilation.BuildManager.CallPreStartInitMethods (문자열 preStartInitListPath) 203
System.Web.Compilation. BuildManager.ExecutePreAppStart() +152
System.Web.Hosting.HostingEnvironment.초기화 (하게, ApplicationManager AppManager를, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters의 hostingParameters, PolicyLevel policyLevel, 예외 appDomainCreationException) 1151

[HttpException (0X80004005) : 버전 파일 또는 어셈블리 'Common.Logging를로드 할 수 없습니다 = 2.1 .1.0, 문화 = 중립, PublicKeyToken = af08829b84f0328e '또는 해당 종속성 중 하나. 어셈블리의 매니페스트 정의에 일치하는 어셈블리 참조가 일치하지 않습니다. (HRESULT에서 예외 : 0x80131040)]
System.Web.HttpRuntime.FirstRequestInit (HttpContext를 컨텍스트) 12,881,540 System.Web.HttpRuntime.EnsureFirstRequestInit (HttpContext를 컨텍스트) 159 System.Web.HttpRuntime.ProcessRequestNotificationPrivate (IIS7WorkerRequest WR, HttpContext context) +12722601

버전 정보 : Microsoft .NET Framework 버전 : 4.0.30319; ASP.NET 버전 : 4.0.30319.17929

그것의

+0

이 게시물이 도움이 될 수도 있습니다. http://stackoverflow.com/questions/2236772/quartz-net-and-common-logging-using-log4net – MUG4N

답변

3

나는 문제에서 힌트를 생각이 라인 (로그에 따라) 2.1.1.0로 리디렉션하려고 왜 확실하지 :

LOG: Redirect found in application configuration file: 2.0.0.0 redirected to 2.1.1.0. 

는 버전 2.1.1.0 언제 뭔가를로드하려고 그것을 말하고있다 어셈블리 리디렉션을위한 응용 프로그램 구성 파일 (의 app.config)을 확인 버전 2.0.0.0를 요청합니다.

관련 문제