Global Assembly Cache

The Global Assembly Cache ( GAC) is a method of. NET framework in order to avoid version conflicts between libraries.

Identity and Installation in the GAC

The identity of an assembly made ​​up of five components: the name, the file version, language version, public key token and the processor architecture for which the assembly was translated. The identity of the assembly is secured via a so -called " strong name ". The name is protected by signing the assembly with a public key. It is possible several times to install an assembly by signing with different keys in the GAC. Thus, for example, a software vendor change an open source library ( patch ) and sign with his own keys. This assembly can then be installed in addition to the original assembly in spite of the same name and version number in the GAC. Localized versions such as for German or French ( DE, FR) is also part of the assembly's identity, such as the optimization of a processor platform (CIL (MSIL), x86, X64 ).

The GAC therefore enables the system- wide deployment of assemblies without name conflicts of the underlying files (DLLs or EXEs ) to be accepted. The so-called DLL Hell was consistently bypassed by introducing the GAC.

The install files in the GAC is usually done via the Windows installer, but can also be done manually with the help of the program GACutil.exe. In the directories of the GAC can be write accessed with administrator rights so requires administrator privileges to install files to the GAC.

Implementation of the GAC in Windows

File system

The shared assemblies are installed and managed in a special directory (% SystemRoot % \ assembly ). This has further subdirectories for each processor architecture (eg GAC, GAC_32, GAC_64, GAC_MSIL ) and the actual assembly name. The directories with the assembly names include subdirectories with the assembly version and the public key. Access to the appropriate assembly version is possible via a directory tree.

Explorer Extension

The Windows Explorer has a special interface for the display of assemblies, the Assembly Cache Viewer. When controlling the % SystemRoot % \ assembly directory to the user all installed assemblies with version, culture, key token and processor architecture displayed. The interface also allows an installation by drag and drop.

269002
de