Ever wondered where shared assemblies actually are stored, and how “side-by-side” is made possible? Well, the secret is about to be revealed….
Ok, so it’s somewhere in the file system… But where exactly?
You’ll need to open the console command prompt (Start -> Run -> cmd -> Ok) – Windows Explorer won’t let you see this view. Change directory to \Windows. Now, even though you won’t see it by running dir command, change directly to Assembly (so, now you are in \windows\assembly). Now run dir command. If you’ve installed .NET 2.0, you should see GAC, GAC_32, GAC_MSIL, and NativeImages_v2.0.50727_32 folders. Change directory to GAC_MSIL folder, and run dir. You should see a number of folder name that match framework assembly names – e.g. Microsoft.MSXML, System, System.Windows.Forms, etc. Change directory again to one of them, e.g. System and run dir command. You’ll see folder(s) names that match version number and public key – if you only have .NET 2.0, you’ll see one folder 220.127.116.11__b77a5c561934e089. Change directory once more into that folder and run dir. Finally you’ll see the actual assembly bits – System.dll.
Your assemblies registered in GAC are stored in same exact way.
As you can see, there is no magic in side-by-side. Now you know…