Microsoft MVP성태의 닷넷 이야기
오류 유형: 33. error MSB6003: SxS DLL 로딩 오류 [링크 복사], [링크+제목 복사],
조회: 28244
글쓴 사람
정성태 (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)
13538정성태1/25/20242420닷넷: 2211. C# - NonGC(FOH) 영역에 .NET 개체를 생성파일 다운로드1
13537정성태1/24/20242524닷넷: 2210. C# - Native 메모리에 .NET 개체를 생성파일 다운로드1
13536정성태1/23/20242599닷넷: 2209. .NET 8 - NonGC Heap / FOH (Frozen Object Heap) [1]
13535정성태1/22/20242465닷넷: 2208. C# - GCHandle 구조체의 메모리 분석
13534정성태1/21/20242259닷넷: 2207. C# - SQL Server DB를 bacpac으로 Export/Import파일 다운로드1
13533정성태1/18/20242481닷넷: 2206. C# - TCP KeepAlive의 서버 측 구현파일 다운로드1
13532정성태1/17/20242364닷넷: 2205. C# - SuperSimpleTcp 사용 시 주의할 점파일 다운로드1
13531정성태1/16/20242267닷넷: 2204. C# - TCP KeepAlive에 새로 추가된 Retry 옵션파일 다운로드1
13530정성태1/15/20242206닷넷: 2203. C# - Python과의 AES 암호화 연동파일 다운로드1
13529정성태1/15/20242084닷넷: 2202. C# - PublishAot의 glibc에 대한 정적 링킹하는 방법
13528정성태1/14/20242231Linux: 68. busybox 컨테이너에서 실행 가능한 C++, Go 프로그램 빌드
13527정성태1/14/20242153오류 유형: 892. Visual Studio - Failed to launch debug adapter. Additional information may be available in the output window.
13526정성태1/14/20242240닷넷: 2201. C# - Facebook 연동 / 사용자 탈퇴 처리 방법
13525정성태1/13/20242205오류 유형: 891. Visual Studio - Web Application을 실행하지 못하는 IISExpress
13524정성태1/12/20242294오류 유형: 890. 한국투자증권 KIS Developers OpenAPI - GW라우팅 중 오류가 발생했습니다.
13523정성태1/12/20242096오류 유형: 889. Visual Studio - error : A project with that name is already opened in the solution.
13522정성태1/11/20242241닷넷: 2200. C# - HttpClient.PostAsJsonAsync 호출 시 "Transfer-Encoding: chunked" 대신 "Content-Length" 헤더 처리
13521정성태1/11/20242299닷넷: 2199. C# - 한국투자증권 KIS Developers OpenAPI의 WebSocket Ping, Pong 처리
13520정성태1/10/20242066오류 유형: 888. C# - Unable to resolve service for type 'Microsoft.Extensions.ObjectPool.ObjectPool`....'
13519정성태1/10/20242126닷넷: 2198. C# - Reflection을 이용한 ClientWebSocket의 Ping 호출파일 다운로드1
13518정성태1/9/20242383닷넷: 2197. C# - ClientWebSocket의 Ping, Pong 처리
13517정성태1/8/20242217스크립트: 63. Python - 공개 패키지를 이용한 위성 이미지 생성 (pystac_client, odc.stac)
13516정성태1/7/20242339닷넷: 2196. IIS - AppPool의 "Disable Overlapped Recycle" 옵션의 부작용
13515정성태1/6/20242611닷넷: 2195. async 메서드 내에서 C# 7의 discard 구문 활용 사례 [1]
13514정성태1/5/20242291개발 환경 구성: 702. IIS - AppPool의 "Disable Overlapped Recycle" 옵션
13513정성태1/5/20242221닷넷: 2194. C# - WebActivatorEx / System.Web의 PreApplicationStartMethod 특성
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...