Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores .net assemblies specifically designated to be shared by several applications on the computer.
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.
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.
Use of GAC
Making two folder namely “service” and “consumer”
“show.cs” file save in “service” folder and “check.cs” file save in “consumer” folder
D:\ service>csc /t:library show.cs
ð Show.dll is created
D:\consumer>csc /r:d:service\show.dll check.cs
D:\consumer>check.exe is created
D:\consumer>check
Authentication problem occurs
In the above snapshoot check.exe file not execute due to authentication problem. For solving this, make strong name and attached with cs file and then make dll. Mapped dll in assembly folder (C:\Windows\Assembly), with the help of gacutil command. This process called shared assembly.
Leave Comment