Microsoft MVP성태의 닷넷 이야기
오류 유형: 33. error MSB6003: SxS DLL 로딩 오류 [링크 복사], [링크+제목 복사]
조회: 28143
글쓴 사람
정성태 (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)
13600정성태4/18/2024271닷넷: 2242. C# - 관리 스레드와 비관리 스레드
13599정성태4/17/2024287닷넷: 2241. C# - WAV 파일의 PCM 사운드 재생(Windows Multimedia)파일 다운로드1
13598정성태4/16/2024316닷넷: 2240. C# - WAV 파일 포맷 + LIST 헤더파일 다운로드1
13597정성태4/15/2024383닷넷: 2239. C# - WAV 파일의 PCM 데이터 생성 및 출력파일 다운로드1
13596정성태4/14/2024758닷넷: 2238. C# - WAV 기본 파일 포맷파일 다운로드1
13595정성태4/13/2024879닷넷: 2237. C# - Audio 장치 열기 (Windows Multimedia, NAudio)파일 다운로드1
13594정성태4/12/20241009닷넷: 2236. C# - Audio 장치 열람 (Windows Multimedia, NAudio)파일 다운로드1
13593정성태4/8/20241050닷넷: 2235. MSBuild - AccelerateBuildsInVisualStudio 옵션
13592정성태4/2/20241206C/C++: 165. CLion으로 만든 Rust Win32 DLL을 C#과 연동
13591정성태4/2/20241167닷넷: 2234. C# - WPF 응용 프로그램에 Blazor App 통합파일 다운로드1
13590정성태3/31/20241072Linux: 70. Python - uwsgi 응용 프로그램이 k8s 환경에서 OOM 발생하는 문제
13589정성태3/29/20241142닷넷: 2233. C# - 프로세스 CPU 사용량을 나타내는 성능 카운터와 Win32 API파일 다운로드1
13588정성태3/28/20241196닷넷: 2232. C# - Unity + 닷넷 App(WinForms/WPF) 간의 Named Pipe 통신파일 다운로드1
13587정성태3/27/20241154오류 유형: 900. Windows Update 오류 - 8024402C, 80070643
13586정성태3/27/20241296Windows: 263. Windows - 복구 파티션(Recovery Partition) 용량을 늘리는 방법
13585정성태3/26/20241094Windows: 262. PerformanceCounter의 InstanceName에 pid를 추가한 "Process V2"
13584정성태3/26/20241047개발 환경 구성: 708. Unity3D - C# Windows Forms / WPF Application에 통합하는 방법파일 다운로드1
13583정성태3/25/20241157Windows: 261. CPU Utilization이 100% 넘는 경우를 성능 카운터로 확인하는 방법
13582정성태3/19/20241417Windows: 260. CPU 사용률을 나타내는 2가지 수치 - 사용량(Usage)과 활용률(Utilization)파일 다운로드1
13581정성태3/18/20241586개발 환경 구성: 707. 빌드한 Unity3D 프로그램을 C++ Windows Application에 통합하는 방법
13580정성태3/15/20241136닷넷: 2231. C# - ReceiveTimeout, SendTimeout이 적용되지 않는 Socket await 비동기 호출파일 다운로드1
13579정성태3/13/20241493오류 유형: 899. HTTP Error 500.32 - ANCM Failed to Load dll
13578정성태3/11/20241628닷넷: 2230. C# - 덮어쓰기 가능한 환형 큐 (Circular queue)파일 다운로드1
13577정성태3/9/20241874닷넷: 2229. C# - 닷넷을 위한 난독화 도구 소개 (예: ConfuserEx)
13576정성태3/8/20241543닷넷: 2228. .NET Profiler - IMetaDataEmit2::DefineMethodSpec 사용법
[1]  2  3  4  5  6  7  8  9  10  11  12  13  14  15  ...