Christian Nagel's OneNotes

.NET Training, Consulting, Coaching - C#, Web Services, Enterprise Services, ASP.NET, Whidbey, Longhorn and More!

Affiliations

Books I've written

INETA UG Leaders

My Blogroll

Whidbey GAC & 64 bit

With Whidbey the directory structure of the global assembly cache changed. Using the Alpha version of Whidbey I cannot see the shared assemblies by opening the explorer to look at <windir>\assembly (using Windows XP). Of course it is possible to use the .NET 2.0 Framework Configuration utility to display these assemblies.

The reason for this is that the directory structure changed. The 1.0/1.1 shared assemblies are in the directory <windir>\assembly\GAC. The .NET 2.0 command line utility gacutil installs the shared assemblies into the directory <windir>\assembly\GAC_Neutral. Besides the directory GAC_Neutral there is a directory GAC_32 that keeps custom marshaler and Microsoft.VisualC assemblies.

I think the reason for this is the 64 bit version of .NET. Specific 64-bit assemblies (marshaling) will be in the GAC_64 directory, and the GAC_Neutral directory is for assemblies that are the same for both 32 and 64 bit versions.

This is a great feature of .NET: moving to 64 bit no changes are needed!
I remember a lot of hard work moving 16-bit applications to 32 bit!

Update: with the March Community Preview the directory GAC_Neutral changed to GAC_MSIL.

Christian

Comments

TrackBack said:

# February 6, 2004 3:00 AM

TrackBack said:

# March 12, 2004 2:42 AM

TrackBack said:

# March 22, 2004 4:56 PM

Jonathan Clark said:

Hmm, when I installed 2.0 it didn't put anything in GAC_Neutral. Also, when I study the behaviour of the .net runtime, it probes in this order:

assembly\GAC_32
assembly\GAC_MSIL
assembly\GAC

From what I can tell it doesn't check GAC_Neutral at all, even though it's created on Install.

Other changes I noticed Whidbey is that NativeImages are stored differently, there is a "shadow" directory for 1.2 assemblies.

Also, filenames are probed different for the new native image. The old paths looked like this:

C:\WINDOWS\assembly\NativeImages1_v1.1.4322\System\1.0.5000.0__b77a5c561934e089_e8d736da


The new native images filenames look like this:
C:\WINDOWS\assembly\NativeImages_v2.0.40607_32\mscorlib\A1166583866D3F0E8B82469A3214675D

The reason (my guess) for the change is the old native images were probed using FindFirstFile and then a hash was calculated for each file to find a match with the original assembly. Now the hash is used as the filename, eliminating the need for FindFirstFile and Hashing - much more efficent. I personally wondered why they did the old probing process...

Btw - Thinstall should support linking Whidbey directly with your EXE soon. A good way to release 2.0 EXEs without having to install beta versions of Whidbey on user's computers.
# July 26, 2004 11:29 PM

Christian said:

GAC_Neutral was only used before Beta 1. Thanks for your information about the probing changes for native images.
# July 27, 2004 2:20 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)