Microsoft MVP성태의 닷넷 이야기
오류 유형: 33. error MSB6003: SxS DLL 로딩 오류 [링크 복사], [링크+제목 복사],
조회: 28236
글쓴 사람
정성태 (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)
13460정성태11/26/20232371닷넷: 2172. .NET 6+ 기반의 COM Server 내에 Type Library를 내장하는 방법파일 다운로드1
13459정성태11/26/20232370닷넷: 2171. .NET Core 3/5+ 기반의 COM Server를 기존의 regasm처럼 등록하는 방법파일 다운로드1
13458정성태11/26/20232377닷넷: 2170. .NET Core/5+ 기반의 COM Server를 tlb 파일을 생성하는 방법(tlbexp)
13457정성태11/25/20232301VS.NET IDE: 187. Visual Studio - 16.9 버전부터 추가된 "Display inline type hints" 옵션
13456정성태11/25/20232627닷넷: 2169. C# - OpenAI를 사용해 PDF 데이터를 대상으로 OpenAI 챗봇 작성 [1]파일 다운로드1
13455정성태11/25/20232518닷넷: 2168. C# - Azure.AI.OpenAI 패키지로 OpenAI 사용파일 다운로드1
13454정성태11/23/20232861닷넷: 2167. C# - Qdrant Vector DB를 이용한 Embedding 벡터 값 보관/조회 (Azure OpenAI) [1]파일 다운로드1
13453정성태11/23/20232345오류 유형: 879. docker desktop 설치 시 "Invalid JSON string. (Exception from HRESULT: 0x83750007)"
13452정성태11/22/20232450닷넷: 2166. C# - Azure OpenAI API를 이용해 사용자가 제공하는 정보를 대상으로 검색하는 방법파일 다운로드1
13451정성태11/21/20232582닷넷: 2165. C# - Azure OpenAI API를 이용해 ChatGPT처럼 동작하는 콘솔 응용 프로그램 제작파일 다운로드1
13450정성태11/21/20232387닷넷: 2164. C# - Octokit을 이용한 GitHub Issue 검색파일 다운로드1
13449정성태11/21/20232493개발 환경 구성: 688. Azure OpenAI 서비스 신청 방법
13448정성태11/20/20232793닷넷: 2163. .NET 8 - Dynamic PGO를 결합한 성능 향상파일 다운로드1
13447정성태11/16/20232675닷넷: 2162. ASP.NET Core 웹 사이트의 SSL 설정을 코드로 하는 방법
13446정성태11/16/20232636닷넷: 2161. .NET Conf 2023 - Day 1 Blazor 개요 정리
13445정성태11/15/20232933Linux: 62. 리눅스/WSL에서 CA 인증서를 저장하는 방법
13444정성태11/15/20232678닷넷: 2160. C# 12 - Experimental 특성 지원
13443정성태11/14/20232736개발 환경 구성: 687. OpenSSL로 생성한 사용자 인증서를 ASP.NET Core 웹 사이트에 적용하는 방법
13442정성태11/13/20232526개발 환경 구성: 686. 비주얼 스튜디오로 실행한 ASP.NET Core 사이트를 WSL 2 인스턴스에서 https로 접속하는 방법
13441정성태11/12/20232836닷넷: 2159. C# - ASP.NET Core 프로젝트에서 서버 Socket을 직접 생성하는 방법파일 다운로드1
13440정성태11/11/20232460Windows: 253. 소켓 Listen 시 방화벽의 Public/Private 제어 기능이 비활성화된 경우
13439정성태11/10/20233056닷넷: 2158. C# - 소켓 포트를 미리 시스템에 등록/예약해 사용하는 방법(Port Exclusion Ranges)파일 다운로드1
13438정성태11/9/20232625닷넷: 2157. C# - WinRT 기능을 이용해 윈도우에서 실행 중인 Media App 제어
13437정성태11/8/20232792닷넷: 2156. .NET 7 이상의 콘솔 프로그램을 (dockerfile 없이) 로컬 docker에 배포하는 방법
13436정성태11/7/20233015닷넷: 2155. C# - .NET 8 런타임부터 (Reflection 없이) 특성을 이용해 public이 아닌 멤버 호출 가능
13435정성태11/6/20232936닷넷: 2154. C# - 네이티브 자원을 포함한 관리 개체(예: 스레드)의 GC 정리
1  2  3  4  5  6  [7]  8  9  10  11  12  13  14  15  ...