Hi
How to add and remove an assembly from GAC?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Javeed M ShaikhRank #839 · 2.7K reputationPosted Oct 20, 2011, 5:50 PM EDT
Open Visual Studio Command Prompt and type the following:
1. To Add an assembly to GAC
GACUTIL /i
2. To Remove the assembly from GAC
GACUTIL /u
Please do not forget to mark "Accepted Answer".
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 20, 2011, 7:52 PM EDT
Each computer that .NET is installed on has a Global Assembly Cache (GAC) located in the Assembly folder in the Windows directory (usually: C:\WinNT\Assembly). The GAC contains information about shared assemblies which are components that can be shared among several applications (Ex. a DLL).
Shared assemblies must have globally unique names derived from their strong names (public keys generated to distinguish assemblies from other assemblies that may have the same names) which is Microsoft's solution to DLL hell. The GAC, not the registry, is the store for this information. When an application loads the GAC is examined by the Common Language Runtime to determine if the version of a shared component exists that is compatible with the one referenced by the application.
The gacutil.exe that ships with .NET can be used to add or remove a shared assembly from the GAC.
To add a shared assembly, from the command line enter:
To remove a shared assembly, from the command line enter:
When viewing the GAC in Windows Explorer shfusion.dll is used to provide the user interface. You can locate and rename this DLL to view the GAC like any other folder.
Thanks