GAC (Global Assembly Cache)
1. GAC path
1) C:\Windows\Assembly (for .NET 2.0 ~ 3.5)
2) C:\WINDOWS\Micorosoft.NET\assembly (for .NET 4.0)
2. How to install an assembly into GAC
1) Drag and Drop
2) Use GacUtil.exe with Visual Studio Command Prompt
gacutil -i <Path><Assembly Name>.dll
- Note: To install an assembly into the GAC, the assembly must be strongly named.
Otherwise you get an error like this: Failure adding assembly to the cache:
Attempt to install an assembly without a strong name.
3. How to uninstall an assembly from GAC
gacutil -u <Assembly Name>, Version=1.0.0.0, PublickeyToken=<publicKey>
- Note: <Assembly Name> has no extention, .dll.
Version and PublickeyToken can be omitted and be checked in GAC assembly.
Comments