What is GAC?



What is GAC?..

Answer / sanjeev kumar

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 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.

Note There are scenarios where you explicitly do not
want to install an assembly into the global assembly cache.
If you place one of the assemblies that make up an
application in the global assembly cache, you can no longer
replicate or install the application by using the xcopy
command to copy the application directory. You must move
the assembly in the global assembly cache as well.

There are several ways to deploy an assembly into the
global assembly cache:

* Use an installer designed to work with the global
assembly cache. This is the preferred option for installing
assemblies into the global assembly cache.
* Use a developer tool called the Global Assembly Cache
tool (Gacutil.exe), provided by the .NET Framework SDK.
* Use Windows Explorer to drag assemblies into the
cache.

Note In deployment scenarios, use Windows
Installer 2.0 to install assemblies into the global
assembly cache. Use Windows Explorer or the Global Assembly
Cache tool only in development scenarios, because they do
not provide assembly reference counting and other features
provided when using the Windows Installer.

Administrators often protect the WINNT directory using an
access control list (ACL) to control write and execute
access. Because the global assembly cache is installed in
the WINNT directory, it inherits that directory's ACL. It
is recommended that only users with Administrator
privileges be allowed to delete files from the global
assembly cache.

Assemblies deployed in the global assembly cache must have
a strong name. When an assembly is added to the global
assembly cache, integrity checks are performed on all files
that make up the assembly. The cache performs these
integrity checks to ensure that an assembly has not been
tampered with, for example, when a file has changed but the
manifest does not reflect the change.

Is This Answer Correct ?    16 Yes 0 No

Post New Answer

More C Sharp Interview Questions

What is delegates in c# and uses of delegates?

0 Answers  


What are iterators?

5 Answers   TCS,


what is the difference between int and Int32?

5 Answers   TCS,


What is the components of window?

0 Answers  


What is assembly manifest?

0 Answers  






Write a program in C# for checking a given number is PRIME or not.

0 Answers  


Is null empty or whitespace c#?

0 Answers  


what is meant inheritance. can you exaplain what kind inhertance ussed in your project

1 Answers  


What does assemblyinfo.cs consists ?

4 Answers   Microsoft,


If there are 2 interface IParentInterface & IChildInterface as follows. interface IParentInterface { void InterfaceMethod(); } interface IChildInterface : IParentInterface { void InterfaceMethod(); } Both the interface contains method with same name InterfaceMethod(). How InterfaceMethod() will be handled in IChildInterface as its deriving IParentInterface

3 Answers  


What is the difference between dynamic type variables and object type variables in c#?

0 Answers  


What is the meaning of MSIL?

0 Answers   TCS,


Categories