hi
can you tell me what is GAC ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nikahat KhanPosted Oct 25, 2011, 6:41 AM
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.
Sam HobbsPosted Oct 24, 2011, 1:48 PM
Prabhu RajaPosted Oct 24, 2011, 1:50 AM
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/
Satyapriya NayakPosted Oct 23, 2011, 1:37 PM
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