The Global Assembly Cache (GAC) stores assemblies that are meant to be shared by several applications that run on the computer. It is located in %WINDIR%\Assembly. Mine for example, is located in C:\WINDOWS\assembly.
There are several ways to install an assembly into the GAC:
- Drag the assembly from your BIN folder into %WINDIR%\Assembly
- Use the Windows Installer (this will be covered in a future article).
- Use the Global Assembly Cache tool: gacutil.exe.
The following is an overview of the gacutil.exe tool and its commands:
The gacutil syntax should be in the following format:
gacutil [options] [assemblyName | assemblyPath | assemblyListFile]
Here are some examples:
Install an assembly to the GAC:
gacutil /i assemblyToInstall.dll
Remove an assembly from the GAC:
gacutil /r assemblyToRemove.dll
List all assemblies in the GAC:
gacutil /l
List all assemblies matching a specified name:
gacutil /l System.Web.dll
Notes:
To install the assembly it must be strongly named. I will explain this in a future article.
References:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/html/cpgrfglobalassemblycacheutilitygacutilexe.asp
http://support.microsoft.com/default.aspx?scid=kb;en-us;815808#kb1#kb1
Theme design by Jelle Druyts
Pick a theme: BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2 BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2
Powered by: newtelligence dasBlog 2.0.7226.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2008, Steven Rockarts
E-mail