Microsoft MVP성태의 닷넷 이야기
디버깅 기술: 4. VC++ 8.0 원격 디버깅 구성 - Side-by-Side DLL 문제. [링크 복사], [링크+제목 복사],
조회: 23564
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 

오랜만에, 제 컴퓨터에서 원격 XP 컴퓨터를 대상으로 원격 디버깅을 구성하게 되었습니다.
Internet Explorer에서 활성화되는 COM 개체이기 때문에, XP 컴퓨터에 regsvr32.exe로 등록을 하려고 했는데... 이게 왠일입니까? ^^; VC++ 8.0에서의 Side-by-Side(이후, SxS로 지칭) 지원과 함께 XP/2003에서의 SxS 기능이 결합되어 정상적으로 등록이 안되는 것입니다.

등록을 시도하면 아래와 같은 오류 화면이 나옵니다.

등록 오류

LoadLibrary("...") failed - This application has failed to start 
because the application configuration is incorrect. Reinstalling the application may fix this problem.

좀 더 자세한 오류를 보기 위해서 depends.exe로 해당 DLL을 열어보니 아래와 같은 오류 화면이 나옵니다.

Depends.exe에서 확인

Error: The Side-by-Side configuration information in "C:\...DLL" contains errors. 
This application has failed to start because the application configuration is incorrect.
Reinstalling the application may fix this problem (14001).
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.

또한, 이벤트 로그에도 다음과 같은 오류 3개가 차례대로 나타나게 됩니다.

오류 1:
Generate Activation Context failed for C:\...\Test.dll. 
Reference error message: The operation completed successfully.

오류 2:
Resolve Partial Assembly failed for Microsoft.VC80.DebugCRT. 
Reference error message: The referenced assembly is not installed on your system.

오류 3:
Dependent Assembly Microsoft.VC80.DebugCRT could not be found and 
Last Error was The referenced assembly is not installed on your system.

어허... 세월이 얼마나 흘렀다고 그 얼마 안되는 기간에 이런 변화가 있었는지... ^^;

해결 방법은 간단합니다. 해당 시스템에 - 위에서는 Microsoft.VC80.DebugCRT 관련 DLL을 정상적으로 활성화 시킬 수 없어서 발생 - 적절하게 관련 DLL들을 C:\Windows\WinSxS 폴더에 설정해 주거나, 아니면 해당 COM 개체가 있는 폴더에 관련 DLL 및 Manifest 파일을 넣어주면 됩니다. 전자의 방법은... ^^ 나중에 필요하면 다시 알아보고 설명드릴테니... 여기서는 쉬운 후자의 방법을 택해서 일단 원격 디버깅을 계속 해나가도록 하겠습니다.

문제 해결을 위해 "Microsoft.VC80.DebugCRT"에 해당하는 DLL과 Manifest 파일이 필요한데요. Visual Studio 2005가 설치된 개발자 PC에서 아래와 같은 폴더로 이동하면 4개의 파일을 볼 수가 있습니다.

폴더 - C:\Program Files\Microsoft Visual Studio 8\VC\redist\Debug_NonRedist\x86\Microsoft.VC80.DebugCRT

파일 - Microsoft.VC80.DebugCRT.manifest
파일 - msvcm80d.dll
파일 - msvcp80d.dll
파일 - msvcr80d.dll

위의 4개 파일을 COM 개체가 있는 폴더에 그대로 복사합니다. 대강 아래와 같은 모습이 되겠지요.

정상적으로 구성된 파일들

자, 이제 기존에 했던 것처럼, regsvr32.exe를 하면 정상적으로 등록이 되는 것을 확인할 수 있습니다.






[최초 등록일: ]
[최종 수정일: 7/10/2021]

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

비밀번호

댓글 작성자
 




1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
13843정성태12/13/20244393오류 유형: 938. Docker container 내에서 빌드 시 error MSB3021: Unable to copy file "..." to "...". Access to the path '...' is denied.
13842정성태12/12/20244538디버깅 기술: 205. Windbg - KPCR, KPRCB
13841정성태12/11/20244866오류 유형: 937. error MSB4044: The "ValidateValidArchitecture" task was not given a value for the required parameter "RemoteTarget"
13840정성태12/11/20244441오류 유형: 936. msbuild - Your project file doesn't list 'win' as a "RuntimeIdentifier"
13839정성태12/11/20244879오류 유형: 936. msbuild - error CS1617: Invalid option '12.0' for /langversion. Use '/langversion:?' to list supported values.
13838정성태12/4/20244609오류 유형: 935. Windbg - Breakpoint 0's offset expression evaluation failed.
13837정성태12/3/20245075디버깅 기술: 204. Windbg - 윈도우 핸들 테이블 (3) - Windows 10 이상인 경우
13836정성태12/3/20244633디버깅 기술: 203. Windbg - x64 가상 주소를 물리 주소로 변환 (페이지 크기가 2MB인 경우)
13835정성태12/2/20245076오류 유형: 934. Azure - rm: cannot remove '...': Directory not empty
13834정성태11/29/20245309Windows: 275. C# - CUI 애플리케이션과 Console 윈도우 (Windows 10 미만의 Classic Console 모드인 경우) [1]파일 다운로드1
13833정성태11/29/20244984개발 환경 구성: 737. Azure Web App에서 Scale-out으로 늘어난 리눅스 인스턴스에 SSH 접속하는 방법
13832정성태11/27/20244922Windows: 274. Windows 7부터 도입한 conhost.exe
13831정성태11/27/20244383Linux: 111. eBPF - BPF_MAP_TYPE_PERF_EVENT_ARRAY, BPF_MAP_TYPE_RINGBUF에 대한 다양한 용어들
13830정성태11/25/20245206개발 환경 구성: 736. 파이썬 웹 앱을 Azure App Service에 배포하기
13829정성태11/25/20245184스크립트: 67. 파이썬 - Windows 버전에서 함께 설치되는 py.exe
13828정성태11/25/20244452개발 환경 구성: 735. Azure - 압축 파일을 이용한 web app 배포 시 디렉터리 구분이 안 되는 문제파일 다운로드1
13827정성태11/25/20245106Windows: 273. Windows 환경의 파일 압축 방법 (tar, Compress-Archive)
13826정성태11/21/20245342닷넷: 2313. C# - (비밀번호 등의) Console로부터 입력받을 때 문자열 출력 숨기기(echo 끄기)파일 다운로드1
13825정성태11/21/20245680Linux: 110. eBPF / bpf2go - BPF_RINGBUF_OUTPUT / BPF_MAP_TYPE_RINGBUF 사용법
13824정성태11/20/20244753Linux: 109. eBPF / bpf2go - BPF_PERF_OUTPUT / BPF_MAP_TYPE_PERF_EVENT_ARRAY 사용법
13823정성태11/20/20245306개발 환경 구성: 734. Ubuntu에 docker, kubernetes (k3s) 설치
13822정성태11/20/20245176개발 환경 구성: 733. Windbg - VirtualBox VM의 커널 디버거 연결 시 COM 포트가 없는 경우
13821정성태11/18/20245096Linux: 108. Linux와 Windows의 프로세스/스레드 ID 관리 방식
13820정성태11/18/20245254VS.NET IDE: 195. Visual C++ - C# 프로젝트처럼 CopyToOutputDirectory 항목을 추가하는 방법
13819정성태11/15/20244499Linux: 107. eBPF - libbpf CO-RE의 CONFIG_DEBUG_INFO_BTF 빌드 여부에 대한 의존성
13818정성태11/15/20245307Windows: 272. Windows 11 24H2 - sudo 추가
1  2  3  [4]  5  6  7  8  9  10  11  12  13  14  15  ...