The .NET 4 Global Assembly Cache is divided into 2 folders:
C:\Windows\Microsoft.NET\assembly\GAC_32
C:\Windows\Microsoft.NET\assembly\GAC_MSIL
I am intrigued about the GAC_32 folder. Should I assume that the assemblies in this folder (like System.Data) are in native code and not managed code? Is it x86 specific?
GAC_32 and GAC_64 contain mixed-mode assemblies. Assemblies that contain both managed code and native code. They are generated from code produced by the C++/CLI compiler, a compiler that knows how to easily call native code from managed code without having to use pinvoke. The assembly format is flexible enough to support both kinds of code. A dead giveaway is seeing the
<Module>class in the global namespace with a disassembler.Given that they contain native code, they have a hard dependency on the machine architecture. So you need separate copies of the assembly on a 64-bit machine. The GAC_32 and GAC_64 folders store those separate copies, the CLR automatically picks the correct one based on the bitness of the process.
There are not that many framework assemblies that are mixed mode. Mscorlib.dll is one, it is close to the operating system. System.Data.dll has a strong dependency on database providers which are all available only in native code. WPF’s PresentationCore.dll has a strong dependency on Milcore, a native layer that interface to DirectX. Etcetera.