Microsoft MVP성태의 닷넷 이야기
오류 유형: 33. error MSB6003: SxS DLL 로딩 오류 [링크 복사], [링크+제목 복사],
조회: 28245
글쓴 사람
정성태 (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)
13513정성태1/5/20242221닷넷: 2194. C# - WebActivatorEx / System.Web의 PreApplicationStartMethod 특성
13512정성태1/4/20242169개발 환경 구성: 701. IIS - w3wp.exe 프로세스의 ASP.NET 런타임을 항상 Warmup 모드로 유지하는 preload Enabled 설정
13511정성태1/4/20242193닷넷: 2193. C# - ASP.NET Web Application + OpenAPI(Swashbuckle) 스펙 제공
13510정성태1/3/20242119닷넷: 2192. C# - 특정 실행 파일이 있는지 확인하는 방법 (Linux)
13509정성태1/3/20242168오류 유형: 887. .NET Core 2 이하의 프로젝트에서 System.Runtime.CompilerServices.Unsafe doesn't support netcoreapp2.0.
13508정성태1/3/20242215오류 유형: 886. ORA-28000: the account is locked
13507정성태1/2/20242857닷넷: 2191. C# - IPGlobalProperties를 이용해 netstat처럼 사용 중인 Socket 목록 구하는 방법파일 다운로드1
13506정성태12/29/20232444닷넷: 2190. C# - 닷넷 코어/5+에서 달라지는 System.Text.Encoding 지원
13505정성태12/27/20232973닷넷: 2189. C# - WebSocket 클라이언트를 닷넷으로 구현하는 예제 (System.Net.WebSockets)파일 다운로드1
13504정성태12/27/20232564닷넷: 2188. C# - ASP.NET Core SignalR로 구현하는 채팅 서비스 예제파일 다운로드1
13503정성태12/27/20232428Linux: 67. WSL 환경 + mlocate(locate) 도구의 /mnt 디렉터리 검색 문제
13502정성태12/26/20232544닷넷: 2187. C# - 다른 프로세스의 환경변수 읽는 예제파일 다운로드1
13501정성태12/25/20232316개발 환경 구성: 700. WSL + uwsgi - IPv6로 바인딩하는 방법
13500정성태12/24/20232405디버깅 기술: 194. Windbg - x64 가상 주소를 물리 주소로 변환
13498정성태12/23/20233080닷넷: 2186. 한국투자증권 KIS Developers OpenAPI의 C# 래퍼 버전 - eFriendOpenAPI NuGet 패키지
13497정성태12/22/20232491오류 유형: 885. Visual Studiio - error : Could not connect to the remote system. Please verify your connection settings, and that your machine is on the network and reachable.
13496정성태12/21/20232470Linux: 66. 리눅스 - 실행 중인 프로세스 내부의 환경변수 설정을 구하는 방법 (gdb)
13495정성태12/20/20232411Linux: 65. clang++로 공유 라이브러리의 -static 옵션 빌드가 가능할까요?
13494정성태12/20/20232575Linux: 64. Linux 응용 프로그램의 (C++) so 의존성 줄이기(ReleaseMinDependency) - 두 번째 이야기
13493정성태12/19/20232689닷넷: 2185. C# - object를 QueryString으로 직렬화하는 방법
13492정성태12/19/20232365개발 환경 구성: 699. WSL에 nopCommerce 예제 구성
13491정성태12/19/20232267Linux: 63. 리눅스 - 다중 그룹 또는 사용자를 리소스에 권한 부여
13490정성태12/19/20232397개발 환경 구성: 698. Golang - GLIBC 의존을 없애는 정적 빌드 방법
13489정성태12/19/20232174개발 환경 구성: 697. GoLand에서 ldflags 지정 방법
13488정성태12/18/20232107오류 유형: 884. HTTP 500.0 - 명령행에서 실행한 ASP.NET Core 응용 프로그램을 실행하는 방법
13487정성태12/16/20232411개발 환경 구성: 696. C# - 리눅스용 AOT 빌드를 docker에서 수행 [1]
1  2  3  4  [5]  6  7  8  9  10  11  12  13  14  15  ...