1.

What is GAC

Answer»

GAC stands for Global Assembly Cache.

  • It reserves an AREA for .NET Application to STORE the assemblies in the memory running on a certain machine.
  • It helps in sharing the assemblies to all .NET application.
  • To install in GAC, assemblies must have a strong name and must be publicly shared.
  • by using Graphical User interface and the command line tool we can WORK with a cache by installing the CLR which has the global assembly cache and the one with windows shell extensions this is called as Global Assembly Cache tool (Gacutil.exe).
  • The .NET Framework provides two TOOLS for working with cache

When we want to share the assembly to the whole application then we use GAC which is stored in the folder of windows directory 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). In .Net there is no need to register the assembly before taking it in use. We can easily access it globally since it will not conflict by identifying its name, version, architecture, culture and public key

It has a certain feature of a shared library where different users can use the file which is stored in a common folder. In .NET 4.0, its default location is: %windir%\Microsoft.NET\assembly

There are two tools related to GAC are:

  1. GAC Tool (gacutil.exe): It is used to check for assembly existence, to register the shared assembly and to view and manipulate GAC contents.
  2. Assembly Cache Viewer (shfusion.dll): It helps in displaying the details like version, culture ETC. with the assemblies which are associated with it in the cache.


Discussion

No Comment Found