In this post, we will discuss what is GAC in.Net. Also, you can check out my previous post on ExecuteNonQuery(), ExecuteReader() and ExecuteScalar() in Ado.Net, Anonymous Types in C#.Net and WCF interview questions and answers in C#.Net.
– GAC stands for Global Assembly Cache.
– GAC can be termed as a registry of.Net framework for maintaining shared assemblies. This comes with.Net installation.
– Location of GAC is C:\Windows\assembly
– The GAC folder is accessible with security options-
1. The folder will only accept strong name assemblies.
2. The folder is accessible to the user with administrative privileges for placing assembly or removing the assembly.
– You can place an assembly into GAC in two ways:
1. Drag and Drop: Through explorer view, you can drag and drop the assembly to the GAC.
2. GACUtil.exe: You can put assembly to GAC using the command line utility GACUtil.exe
Gacutil -i “Path of the assembly”
It will put the dll into GAC.
– To remove an assembly from GAC you can use the same GACUtil utility as below:
Gacutil -u AssemblyName
The above command will remove the assembly from GAC.
– Windows registry will maintain the location of COM components whereas GAC will contain assembly.
– Windows registry cannot contain multiple versions of COM component whereas GAC can contain multiple versions of an assembly.
Download FREE SharePoint 2019 Installation PDF Guide
This FREE PDF contains, Steps by step guide to install SharePoint 2019 Preview, prerequisites, hardware and software new features. First impression to SharePoint Server 2019 new modern site, modern lists and modern document libraries.
You May Also like the Following SharePoint Online Tutorials: