Global Assembly Cache

I l @ ve RuBoard

The Global Assembly Cache (GAC) is meant to be a replacement for shared components . In the world of COM, each COM coclass , interface , progid , and so on was registered in the system Registry. The COM subsystem used this information to locate the COM component and load the object. In .NET, the global assembly cache serves as the home for all shared components. Any .NET component can be installed into the GAC using the gacutil.exe utility shipped with the .NET runtime or by using Windows Explorer and dropping the component into the GAC directory. The GAC is located in a directory under the base system directory; in the case of Windows 2000, all shared components are located in C:\WINNT\assembly , assuming that installation defaults were used. Figure 5.2.1 shows the contents of the GAC.

Figure 5.2.1. Contents of GAC directory.

graphics/0502fig01.gif

Every .NET component has a manifest as part of the assembly file; this manifest includes versioning information that is used by the CLR loader to enforce .NET component versioning. The version number consists of the following parts :

  • Major

  • Minor

  • Revision

  • Build Number

These four pieces of version information are used to ensure that the proper .NET component is loaded for a given client application. If a client application requests a version that does not exist, the CLR loader will fail and report the failure information.

I l @ ve RuBoard


C# and the .NET Framework. The C++ Perspective
C# and the .NET Framework
ISBN: 067232153X
EAN: 2147483647
Year: 2001
Pages: 204

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net