An assembly that is shared by multiple applications is called a global assembly and is installed in the global assembly cache (GAC). The GAC is a machine wide cache that contains the assemblies that are shared by multiple applications. GAC is used where shared .Net assembly reside. GAC is used in the following situations:
- If the application has to be shared among several applications.
- If the assembly has some special security requirements like only administrator can remove the assembly. If the assembly is private then simple delete can remove the assembly.
Note:- Registering .Net assembly in GAC can lead to the old problem of DLL Hell. Where COM version was stored in central registry, so GAC should be used when absolutely necessary.
DLL Hell:
" DLL Hell " refers to the set of problems caused when multiple applications attempt to share a common component like a dynamic link library (DLL) or a Component Object Model (COM) class. In the most typical case, one application will install a new version of the shared component that is not backward compatible with the version already on the machine. Although the application that has just been installed works well, existing applications that depended on a previous version of the shared component might no longer work. Sometimes, the previous version not able to produce the desired results.
The reason for these issues is that version information about the different components of an application is not recorded or enforced by the system. Also, changes made to the system on behalf of one application will typically affect all applications on the machine.
The solution to this problem is GAC. This Cache is a repository for all the .Net components that are shared globally on a particular machine. When a .Net component is installed onto the machine, the Global Assembly Cache looks at its version, its public key, and its language information and creates a strong name for the component. The component is then registered in the repository and indexed by its strong name, so there is no confusion between different versions of the same component, or DLL.
.Net Framework introduced something called side- by-side execution. Side by side is the ability to install and run multiple versions of the same component on the machine concurrently at the same time without interfering with each other. With components that support side-by-side, authors aren't necessarily tied to maintaining strict backward compatibility because different applications are free to use different versions of a shared component.
Dotnet Discussion
- - Web application
- - Great Indian Developer Su
- - Aspx page inside Silverli
- - Open aspx page inside Sil
- - Guidance for a novice





