Like a little Assembly with your GAC?

Q: Is it posssible to get an assembly out of the GAC to another folder? Let's say you GAC-ed an assembly but you deleted the source by accident?

A: The assembly would be stored in this folder <windowsdir>\assembly\GAC\<Assembly Name>\Version_PublicKeyToken. You can get that using the copy command from the command prompt and using "CD dirname". From Windows Explorer, you cannot do it as Explorer has a custom view of the windows\assembly folder that hides the actual files and subfolders. That's for 1.1 Assemblies. 2.0 Assemblies would be in <windowsdir>\assembly\GAC_MSIL\<Assembly Name>\Version_PublicKeyToken.

Q: GAC_32, GAC_MSIL, GAC_64 - What gives?

Specifically why is there is a GAC_32 and a GAC_MSIL folder? Is it because some assemblies are compiled to x86 machine code (GAC_32) and some assemblies are compiled to MSIL? What dictates where your assembly ends up?

A: The GAC_MSIL cache contains assemblies that can be run in either 32-bit or 64-bit mode, and are JIT compiled to the required word size as needed.

The 32/64 directories contain assemblies that are specific to either 32-bit or 64-bit mode, either because they contain native code or because they make specific assumptions about the word size.

A 32-bit system will only have the GAC_32 directory. A 64-bit system will have both because 32-bit code is supported via emulation (WOW32).

This distinction is new to .NET 2.0, so all the above applies to .NET 2 assemblies. There may be another directory called just "GAC" that contains .NET 1.x assemblies.

Q: What's "GAC"?
A:
We'll let Wikipedia have that one.

Comments

Popular posts from this blog

FIREFOX / IE Word-Wrap, Word-Break, TABLES FIX

Some observations on Script Callbacks, "AJAX", "ATLAS" "AHAB" and where it's all going.

FIX: Requested Registry Access is not allowed (Visual Studio 2008)