성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Java - How to use the Foreign Funct...
[정성태] 제가 큰 실수를 했군요. ^^; Delegate를 통한 Bein...
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>GAC에 어셈블리 등록을 위해 gacutil.exe을 사용하는 경우 주의 사항</h1> <p> gacutil.exe는 .NET Runtime에는 포함되어 있지 않고 SDK 도구에 포함되어 있습니다. 자바같으면 JRE에는 없고 JDK에는 있는 격입니다. 그래서 .msi 설치 파일이 아닌, gacutil.exe를 이용해 직접 어셈블리를 등록하고 싶다면 개발자 PC 또는 Windows SDK가 설치된 PC로부터 gacutil.exe를 복사해 와서 등록을 해야 합니다.<br /> <br /> 그런데, 재미있는 현상이 있습니다. 그렇게 복사해 온 gacutil.exe를 Windows 10 최신 업데이트 PC에서 실행했는데 다음과 같이 아무런 메시지가 없는 것입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp\mod\GlobalAssemblyCache><span style='color: blue; font-weight: bold'>gacutil</span> C:\temp\mod\GlobalAssemblyCache><span style='color: blue; font-weight: bold'>gacutil /i Apache.Web.dll</span> </pre> <br /> 보통, 개발자의 PC에서는 그냥 실행만 해도 다음과 같은 메시지가 나오는데요.<br /> <br /> <pre height: 400px; style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\><span style='color: blue; font-weight: bold'>gacutil</span> Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved. Usage: Gacutil <command> [ <options> ] Commands: /i <assembly_path> [ /r <...> ] [ /f ] Installs an assembly to the global assembly cache. /il <assembly_path_list_file> [ /r <...> ] [ /f ] Installs one or more assemblies to the global assembly cache. /u <assembly_display_name> [ /r <...> ] Uninstalls an assembly from the global assembly cache. /ul <assembly_display_name_list_file> [ /r <...> ] Uninstalls one or more assemblies from the global assembly cache. /l [ <assembly_name> ] List the global assembly cache filtered by <assembly_name> /lr [ <assembly_name> ] List the global assembly cache with all traced references. /cdl Deletes the contents of the download cache /ldl Lists the contents of the download cache /? Displays a detailed help screen Options: /r <reference_scheme> <reference_id> <description> Specifies a traced reference to install (/i, /il) or uninstall (/u, /ul). /f Forces reinstall of an assembly. /nologo Suppresses display of the logo banner /silent Suppresses display of all output </pre> <br /> 동일한 파일을 복사한 PC에서는 아무런 메시지도 나오지 않는 것입니다. (물론, /i 옵션으로 어셈블리 등록도 안됩니다.)<br /> <br /> 해결 방법은, gacutil.exe만 복사해서는 안되고 gacutil.exe.config 파일도 함께 복사해 실행해야 합니다. 그런 경우, 적어도 다음과 같이는 메시지가 출력됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\temp\mod\GlobalAssemblyCache> <span style='color: blue; font-weight: bold'>gacutil</span> Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 Copyright (c) Microsoft Corporation. All rights reserved. </pre> <br /> (그래도 개발자 PC에서 실행할 때와는 메시지 출력에 차이가 있습니다.)<br /> <br /> 어쨌든, 저 정도까지만 내용이 출력되어도 gacutil.exe의 동작에는 이상이 없습니다.<br /> <br /> <hr style='width: 50%' /><br /> <br /> 참고로, 개발자 PC에는 여러 버전의 Windows SDK가 설치되어 있기 때문에 gacutil.exe를 검색하면 많이도 나오는데요.<br /> <br /> 다음의 폴더에 있다면 그것은 .NET 3.5(CLR 2) 시절에 나왔던 gacutil.exe입니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ </pre> <br /> 반면 그 이후에 나온 gacutil.exe들은,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7 Tools </pre> <br /> 모두 .NET 4.x(CLR 4) 이후에 나온 것들입니다. 참고로, .NET 4.x 용의 gacutil.exe는 CLR 2 대상의 어셈블리도 등록할 수 있지만 .NET 3.5 이하의 gacutil.exe는 CLR 4 대상의 어셈블리를 등록할 수 없습니다.<br /> <br /> 게다가 CLR 2와 CLR 4의 GAC 위치도 다릅니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > [CLR 2] C:\Windows\assembly\ [CLR 4] C:\Windows\Microsoft.NET\assembly </pre> <br /> 만약 설치된 dll의 GAC 경로를 확실하게 하고 싶다면 관리자 권한의 명령행 창을 띄워 간단하게 다음과 같이 실행해 보면 됩니다. (또는, 직접 GAC 하위 경로에 찾아들어가면 됩니다.)<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > c:\> <span style='color: blue; font-weight: bold'>dir /a/s</span> Apache.Web.dll </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
1210
(왼쪽의 숫자를 입력해야 합니다.)