5
Reply

What is GAC ?

Snehasis Mishra

Snehasis Mishra

12y
44.4k
0
Reply

    Global Assembly Cache :-- Assemblies can be shared among multiple applications on the machine by registering them in global Assembly cache(GAC). GAC is a machine wide a local cache of assemblies maintained by the .NET Framework. We can register the assembly to global assembly cache by using gacutil command. We can Navigate to the GAC directory, C:\winnt\Assembly in explore. In the tools menu select the cache properties; in the windows displayed you can set the memory limit in MB used by the GAC

    Every computer where the CLR is installed has a reserved area for machine wide code i.e known as GAC (global assembly Cache).Basically GAC stores assemblies specifically to be shared by many application on computer.

    The Global Assembly Cache (GAC) is a folder in Windows directory to store the .NET assemblies that are specifically designated to be shared by all applications executed on a system. The concept of GAC is the result of the .NET architecture whose design addresses the issue of "DLL hell" that existed in COM (Component Object Model). Unlike in COM, there is no need for the assembly in GAC to be registered before its use. Each assembly is accessed globally without any conflict by identifying its name, version, architecture, culture and public key.

    Global Asssembly Cache is used to accomodate the shared assemblies which are used by many applications providing security to the assemblies so that no one can tamper them. You may refer to the article http://ilovemicrosoft.blogspot.com/2012/08/creating-and-sharing-net-assemblies-for.html for more information

    You should share assemblies by installing them into the global assembly cache only when you need to. As a general guideline, keep assembly dependencies private, and locate assemblies in the application directory unless sharing an assembly is explicitly required. In addition, it is not necessary to install assemblies into the global assembly cache to make them accessible to COM interop or unmanaged code.