hi
can you tell me what is GAC ?
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Oct 23, 2011, 9:37 AM EDT
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.
Advantages:- It solves the Dll hell problem.
Thanks
Prabhu RajaRank #861 · 2.6K reputationPosted Oct 23, 2011, 9:50 PM EDT
The GAC directory is structured: it contains many subdirectories, and an algorithm is used to generate the names of these subdirectories. You should never manually copy assembly files into the GAC; instead, you should use tools to accomplish this task. These tools know the GAC's internal structure and how to generate the proper subdirectory names.
Check out this Article : http://www.c-sharpcorner.com/UploadFile/ae35ca/6528/
Sam HobbsRank #107 · 20.5K reputationPosted Oct 24, 2011, 9:48 AM EDT
Nikahat Khan5 reputationPosted Oct 25, 2011, 2:41 AM EDT
GAC stands for Global Assembly cache. The assemblies which are made publicly available to any application resides under Global Assembly cache. These assemblies are also called strong named assemblies.
The strong named assemblies are created by signing them i.e. providing version number, culture information and assigning public key token to it as a digital signature.
There are two ways to create strong type assemblies:
1. First Way: create a public/private key pair that is .snk file.
>sn -k C:\mykey.snk
then sign the assembly with the .snk key file. Go the properties window of the project under Visual studio. There you will find the Signing tab. check the Sign the assembly option and browse for the mykey.snk file to choose strong name key file.
Then use gacutil.exe to add the assembly to the GAC.
gacutil /i "directory of the .dll file\xyz.dll"
your xyz.dll assembly will get added to GAC.
In order to recheck it.... go to the C:\Windows\assembly folder..... there you will find your dll has got added.
2. Second Way: After assigning strong name key..... directly drag the assembly to the C:\Windows\assembly folder.