The Global Assembly Cache

The .NET Framework consists of hundreds of libraries and tools. Most libraries implement the Base Class Library and BCL’s assemblies are located in GAC. This is the reason why you can be sure that a .NET application requiring only base assemblies can correctly work on a target machine having the .NET Framework installed. The GAC can be considered as a repository of shared assemblies; shared means that an application can simply have a reference to an assembly available in the GAC instead of bringing its own copy of the assembly as happens in the XCopy deployment. The GAC is basically a folder in the system and is generally located at C:WindowsAssembly. Because of the particular nature of this folder, its representation within Windows Explorer is a little bit different than other folders. Figure 53.1 shows how the GAC is represented in Windows Explorer.

Figure 53.1 The Global Assembly Cache shown in Windows Explorer.

image

You may notice from Figure 53.1 how the GAC lists installed assemblies, their version number, the public key token, and the target processor architecture. The public key token is a unique identifier that identifies the assembly within the .NET infrastructure. If the assembly targets a specific culture, this information is also shown. You can easily notice how different versions of the same assembly can be available in the GAC. (For example, check the System.Data.SqlServerCe.dll assembly.) This is important because it means that the GAC is responsible for handling different versions of the same assembly, solving the versioning problem (and the registration one).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.173.78