Home > DeveloperSection > Blogs > Global Assembly Cache (GAC)

Global Assembly Cache (GAC)


.NET .NET 
Ratings:
0 Comment(s)
 1889  View(s)
Rate this:

Global Assembly Cache (GAC)

In this blog, I’m explaining the concept of global assembly cache (GAC).

The Global Assembly Cache is a machine-wide store used to hold assemblies that are intended to be shared by several applications on the machine. Each computer where the common language runtime (CLR) is installed has a global assembly cache. The global assembly cache stores mostly shared assembly. The assembly may be used by more than one application and more than one version of the assembly may be required. Multiple versions can sit side-by-side in the GAC.

In the .NET, for shared assembly two tools one is windows shell extension allows you to work with the cache using Graphical User Interface (GUI) and another one is a command line tool, called the Global Assembly Cache tool (Gacutil.exe), that is typically used in build and test scripts.

Global Assembly Tool

This tool allow you to view and manipulate

Syntax:

gacutil [options] [assemblyName | assemblyPath | assemblyListFile]

where,

assemblyName : The name of an assembly.

assemblyPath : The name of a file that contains an assembly manifest.

assemblyListFile : The path to an ANSI text file that lists assemblies to install or uninstall.

Options:-

/i assemblyPath : Installs an assembly into the global assembly cache.

/il assemblyListFile : Installs one or more assemblies specified in assemblyListFile into the global assembly cache.

/l [assemblyName] : Lists the contents of the global assembly cache. If you specify the assemblyName parameter, the tool lists only the assemblies matching that name.

/u assemblyName : Uninstalls an assembly from the global assembly cache.


Don't want to miss updates? Please click the below button!

Follow MindStick