What is GAC ? - Part 13

Global Assembly Cache(GAC) :

  • GAC stands for Global Assembly Cache and contains strong named assemblies.
  • Assembly in the GAC can be shared by all assemblies without having to copy the assembly locally.
  • Basically, it is recommended to install an assembly into GAC, only when required and shared by applications, otherwise they should be kept private.

How to install an assembly into GAC :

There are two ways to install an assembly into GAC,
  • Drag and Drop through Windows Explorer,
  • Using Gacutil.exe(GAC Utility Tool)
To install an assembly using gacutil, use the following command:

gacutil -i C:\DemoProject\Demo.dll

Above command installs Demo.dll into the GAC.

To uninstall an assembly from GAC, use the following command:

gacutil -u DemoLibrary


No comments:

Post a Comment