Understanding .Net Assemblies and References - The GAC E-mail
Article Index
Understanding .Net Assemblies and References
Assembly Name, Identity, & References
Binding Redirects, config Files, & Loading
The GAC
codeBase Path & Probing
All Pages

The GAC

If an assembly of that name had not already been loaded and if it is strongly named, the runtime will check the GAC for the assembly. If found it will be loaded from the GAC. The GAC is only for strongly named assemblies and is structured in such a way as to not rely on filenames. Many different versions of the same assembly (same filename) can coexist happily in the GAC.

The actual physical location of the files in the GAC is in %windir%\assembly (for example, c:\windows\assembly). With version 2.0 of the .Net framework, the GAC was extended to support different processor architectures. From a command window, you can browse the various processor architecture versions of the GAC, which are organized first by the architecture directory (listed below), then name, and finally version with a key token.

The GAC in %windir%\assembly is organized like this:

  • GAC - The original GAC, for .Net verion 1.0 and 1.1 assemblies (no processor architecture)
  • GAC_32 - 32 bit only assemblies
  • GAC_64 - 64 bit only assemblies (only on 64 bit machines)
  • GAC_MSIL - Portable assemblies, which are compiled with ProcessorArchitecture MSIL and can run on any platform.

That said, it's not advisable to poke around in the GAC because its implemention could change over time. In fact, you can only browse the GAC from a command window because if Windows Explorer recognizes that it's been pointed to the GAC, it will show you the GAC interface GUI instead of the typical file browser.



Last Updated ( Saturday, 26 July 2008 20:32 )