GAC

Global Assembly Cache
The GAC is implemented and managed by the .NET Framework.
This was designed to avoid "DLL hell" but still has some drawbacks.
Every assembly added to the GAC must be strong named.


GAC Folder

The folder path used by .NET Framework 4.0 (and above) is

C:\Windows\Microsoft.NET\assembly\GAC_32 (32 bit only) 
C:\Windows\Microsoft.NET\assembly\GAC_64 (64 bit)
C:\Windows\Microsoft.NET\assembly\GAC_MSIL (32 and 64 bit)

The MSIL is an abbreviation for Microsoft Intermediate Language



The folder path used by the .NET Framework 3.5 (and below) is

C:\Windows\assembly\ (32 and 64 bit) 

Assembly Cache Viewer

This viewer is integrated into Windows Explorer and is automatically displayed when you browse to one of the above folders.
You can drag and drop to install and delete to uninstall.
This replaced the Global Assembly Tool


Global Assembly Tool

.NET 1.1 came with a command line tool gacutil.exe
This tool allows you to :
1) Check if an assembly exists
2) Register an assembly in the GAC
3) Copy an assembly into the GAC



Deploying Files from the GAC

If you deploy an application that contains a reference to a custom component that is registered in the GAC this component will not be deployed regardless of this setting
In this situation you must manually add the file
Change the Copy Local to tru
right click the setup project and select (Add > File)
browse to the \bin folder and add it
It will add it to the Application Folder by default.





© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited TopPrevNext