Microsoft MVP성태의 닷넷 이야기
오류 유형: 33. error MSB6003: SxS DLL 로딩 오류 [링크 복사], [링크+제목 복사],
조회: 28254
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 1개 있습니다.)


error MSB6003: SxS DLL 로딩 오류


Orcas 3월 CTP를 삭제하고, Orcas Beta1을 설치한 이후 빌드 시에, 다음과 같은 오류가 발생하기 시작했습니다.

------ Rebuild All started: Project: Test.Main, Configuration: Debug Any CPU ------

Compile complete -- 0 errors, 0 warnings
C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1960,9): 

error MSB6003: The specified task executable could not be run. 
The application has failed to start because its side-by-side configuration is incorrect. 
Please see the application event log for more detail 
Done building project "Test.Main.csproj" -- FAILED.

지시하는 대로, 이벤트 로그를 확인해 보니 다음과 같은 오류 항목을 볼 수 있었습니다.

Activation context generation failed for "C:\Windows\Microsoft.NET\Framework\v2.0.50727\AL.exe". 
Dependent Assembly Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.20129.4864" could not be found. 
Please use sxstrace.exe for detailed diagnosis.

버전이 9.0인 것을 보니, Orcas에서 제공되는 VC++의 런타임 모듈을 AL.exe가 사용하는 것으로 판단이 되더군요. 아마도 Orcas 3월 CTP에 포함되어 있던 "Microsoft.VC90.CRT" 라이브러리의 버전이 "9.0.20129.4864"인 것 같고. 현재 설치되어 있는 Orcas 베타 버전의 "Microsoft.VC90.CRT" 라이브러리의 버전이 "9.0.20404.44800"인 것으로 보아, "AL.exe" 파일은 Orcas 3월 CTP에 포함되어 있던 것이 제거되지 않고 남았고 Beta 버전 설치 이후에 별도로 덮어쓰기가 안 되어서 발생하는 것으로 예상이 되었습니다.

이런 경우, 해결 방법은 여러 가지가 있을 수 있겠습니다. al.exe를 바꾸든지, manifest 파일의 내용을 바꾸든지, 현재의 al.exe가 사용하고 있는 Microsoft.VC90.CRT 버전을 설치해 주든지.

일단, 설치 버전은 물 건너 간 것 같았습니다. 이미 3월 CTP 버전은 삭제된 상태이고, 아직 CTP 버전에 불과해서 해당 "Microsoft.VC90.CRT" 라이브러리의 재배포 모듈이 있을리 만무하기 때문입니다.

새로운 "9.0.20404.44800" 버전을 사용하는 al.exe로 교체하는 방법도, 새로운 Orcas Beta DVD에서 찾아봐도 없더군요. 어느 setup 관련 파일 속에 압축되어 있을지도 모르지만, 별다른 영양가가 없어 보이므로 포기했습니다.

남은 방법은 manifest 파일을 교정하는 것인데요. 운이 좋다면 manifest 파일이 exe 외부에 있어서 간단하게 편집해 줄 수도 있을 텐데, al.exe 의 경우에는 운이 나쁜 것 같습니다.

실제로 sxstrace.exe를 통해서 해당 DLL을 찾는 과정을 보면, manifest 파일이 exe 안에 있는 것을 확인할 수 있습니다.

=================
Begin Activation Context Generation.
Input Parameter:
  Flags = 0
  ProcessorArchitecture = Wow32
  CultureFallBacks = en-US;en
  ManifestPath = C:\Windows\Microsoft.NET\Framework\v2.0.50727\al.exe
  AssemblyDirectory = C:\Windows\Microsoft.NET\Framework\v2.0.50727\
  Application Config File = C:\Windows\Microsoft.NET\Framework\v2.0.50727\al.exe.Config
-----------------
INFO: Parsing Application Config File C:\Windows\Microsoft.NET\Framework\v2.0.50727\al.exe.Config.
INFO: Parsing Manifest File C:\Windows\Microsoft.NET\Framework\v2.0.50727\al.exe.
  INFO: Manifest Definition Identity is al,processorArchitecture="X86",type="win32",version="1.0.0.0".
  INFO: Reference: Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.20129.4864"
INFO: Resolving reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.20129.4864".
  INFO: Resolving reference for ProcessorArchitecture WOW64.
    INFO: Resolving reference for culture Neutral.
      INFO: Applying Binding Policy.
        INFO: No publisher policy found.
        INFO: No binding policy redirect found.
      INFO: Begin assembly probing.
        INFO: Did not find the assembly in WinSxS.
        INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.CRT\9.0.20129.4864__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
        INFO: Did not find manifest for culture Neutral.
      INFO: End assembly probing.
  INFO: Resolving reference for ProcessorArchitecture x86.
    INFO: Resolving reference for culture Neutral.
      INFO: Applying Binding Policy.
        INFO: Find publisher policy at C:\Windows\WinSxS\manifests\x86_policy.9.0.microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.20404.44800_none_32cc56a5de4f0e7a.manifest
        INFO: No binding policy redirect found.
      INFO: Begin assembly probing.
        INFO: Did not find the assembly in WinSxS.
        INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.CRT\9.0.20129.4864__1fc8b3b9a1e18e3b\Microsoft.VC90.CRT.DLL.
        INFO: Attempt to probe manifest at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC90.CRT.DLL.
        INFO: Attempt to probe manifest at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC90.CRT.MANIFEST.
        INFO: Attempt to probe manifest at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC90.CRT\Microsoft.VC90.CRT.DLL.
        INFO: Attempt to probe manifest at C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC90.CRT\Microsoft.VC90.CRT.MANIFEST.
        INFO: Did not find manifest for culture Neutral.
      INFO: End assembly probing.
  ERROR: Cannot resolve reference Microsoft.VC90.CRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.20129.4864".
ERROR: Activation Context generation failed.
End Activation Context Generation.

그런데, 마지막 부분에 manifest 파일을 별도로 찾는 과정이 포함된 것을 볼 수 있습니다. 그렇다면, "C:\Windows\Microsoft.NET\Framework\v2.0.50727\Microsoft.VC90.CRT.MANIFEST" 파일을 생성해 주어서 찾으려는 dll 파일을 우회시키는 것이 가능하다는 이야기인데요.

그래서, Orcas 베타 1에 포함된 다음 파일을 가져다가 "C:\Windows\Microsoft.NET\Framework\v2.0.50727" 폴더에 복사해 놓고 편집을 했습니다.

C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT.manifest

al.exe가 찾으려는 파일이 "9.0.20129.4864" 파일의 버전이기 때문에, manifest 파일의 버전 부분을 기존 값 "9.0.20404.44800"에서 "9.0.20129.4864"으로 바꿔서 저장했습니다.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Copyright (c) Microsoft Corporation.  All rights reserved. -->
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <noInheritable/>
    <assemblyIdentity
        type="win32"
        name="Microsoft.VC90.CRT"
        version="9.0.20129.4864"
        processorArchitecture="x86"
        publicKeyToken="1fc8b3b9a1e18e3b"
    />
    <file name="msvcr90.dll" /> <file name="msvcp90.dll" /> <file name="msvcm90.dll" />
</assembly>

물론, msvcp90.dll, msvcm90.dll(선택적), msvcr90.dll 파일을 같은 폴더에 복사해 주었고.

"9.0.20404.44800" 버전과 "9.0.20129.4864" 버전이 특별하게 다른 사항을 포함하지 않는다면, 잘 동작하겠지요!!!

결과는??? 당연히 ^^ 잘 동작이 되어서 문제는 해결이 되었습니다.



[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 8/6/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 



2007-05-20 10시41분
수작업으로 SxS 설치가 가능할까?... 이에 대한 대답은 다음의 토픽에 있습니다.

Vista & Windows Side by Side Assemblies
; http://kartones.net/blogs/kartones/archive/2007/05/01/vista-windows-side-by-side-assemblies.aspx
kevin25
2011-03-28 11시14분
‘The application has failed to start because its side-by-side configuration is incorrect’ error related to MMC.EXE programs and weird cause & simple solution
; https://devblogs.microsoft.com/cesardelatorre/the-application-has-failed-to-start-because-its-side-by-side-configuration-is-incorrect-error-related-to-mmc-exe-programs-and-weird-cause-simple-solution/
정성태

1  2  [3]  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13563정성태2/21/20241957디버깅 기술: 196. windbg - async/await 비동기인 경우 메모리 덤프 분석의 어려움
13562정성태2/21/20241986오류 유형: 896. ASP.NET - .NET Framework 기본 예제에서 System.Web에 대한 System.IO.FileNotFoundException 예외 발생
13561정성태2/20/20242066닷넷: 2218. C# - (예를 들어, Socket) 비동기 I/O에 대한 await 호출 시 CancellationToken을 이용한 취소파일 다운로드1
13560정성태2/19/20242097디버깅 기술: 195. windbg 분석 사례 - Semaphore 잠금으로 인한 Hang 현상 (닷넷)
13559정성태2/19/20242945오류 유형: 895. ASP.NET - System.Security.SecurityException: 'Requested registry access is not allowed.'
13558정성태2/18/20242183닷넷: 2217. C# - 최댓값이 1인 SemaphoreSlim 보다 Mutex 또는 lock(obj)를 선택하는 것이 나은 이유
13557정성태2/18/20241921Windows: 258. Task Scheduler의 Author 속성 값을 변경하는 방법
13556정성태2/17/20241976Windows: 257. Windows - Symbolic (hard/soft) Link 및 Junction 차이점
13555정성태2/15/20242123닷넷: 2216. C# - SemaphoreSlim 사용 시 주의점
13554정성태2/15/20241862VS.NET IDE: 189. Visual Studio - 닷넷 소스코드 디컴파일 찾기가 안 될 때
13553정성태2/14/20241947닷넷: 2215. windbg - thin/fat lock 없이 동작하는 Monitor.Wait + Pulse
13552정성태2/13/20241899닷넷: 2214. windbg - Monitor.Enter의 thin lock과 fat lock
13551정성태2/12/20242094닷넷: 2213. ASP.NET/Core 웹 응용 프로그램 - 2차 스레드의 예외로 인한 비정상 종료
13550정성태2/11/20242209Windows: 256. C# - Server socket이 닫히면 Accept 시켰던 자식 소켓이 닫힐까요?
13549정성태2/3/20242509개발 환경 구성: 706. C# - 컨테이너에서 실행하기 위한 (소켓) 콘솔 프로젝트 구성
13548정성태2/1/20242339개발 환경 구성: 705. "Docker Desktop for Windows" - ASP.NET Core 응용 프로그램의 소켓 주소 바인딩(IPv4/IPv6 loopback, Any)
13547정성태1/31/20242088개발 환경 구성: 704. Visual Studio - .NET 8 프로젝트부터 dockerfile에 추가된 "USER app" 설정
13546정성태1/30/20241955Windows: 255. (디버거의 영향 등으로) 대상 프로세스가 멈추면 Socket KeepAlive로 연결이 끊길까요?
13545정성태1/30/20241863닷넷: 2212. ASP.NET Core - 우선순위에 따른 HTTP/HTTPS 호스트:포트 바인딩 방법
13544정성태1/30/20241887오류 유형: 894. Microsoft.Data.SqlClient - Could not load file or assembly 'System.Security.Permissions, ...'
13543정성태1/30/20241919Windows: 254. Windows - 기본 사용 중인 5357 포트 비활성화는 방법
13542정성태1/30/20241920오류 유형: 893. Visual Studio - Web Application을 실행하지 못하는 IISExpress - 두 번째 이야기
13541정성태1/29/20241978VS.NET IDE: 188. launchSettings.json의 useSSL 옵션
13540정성태1/29/20242084Linux: 69. 리눅스 - "Docker Desktop for Windows" Container 환경에서 IPv6 Loopback Address 바인딩 오류
13539정성태1/26/20242370개발 환경 구성: 703. Visual Studio - launchSettings.json을 이용한 HTTP/HTTPS 포트 바인딩
13538정성태1/25/20242420닷넷: 2211. C# - NonGC(FOH) 영역에 .NET 개체를 생성파일 다운로드1
1  2  [3]  4  5  6  7  8  9  10  11  12  13  14  15  ...