Geeks With Blogs
Hannes Pavelka It isn't rocket science. Well, unless of course you're NASA

As you probably know shared assemblies are stored in the global assembly cache (GAC) which is located at c:\windows\assembly.If you navigate to this folder you might be surprised to see that is looks a lil different then you might expect. 

 

What you actually see in the windows explorer is an aggregated view of different folders. Open up a dos prompt and navigate to c:\windows\assembly

Technically a shell namespace extension is used to achive this. With the help of a shell namespace extensions you can create some custom functionality for Windows Explorer. One common use is to enable Explorer to present a list of items that do not exist in one real folder, but actually reside in a number of places. The view on the folder makes it look like these items are in one place, so managing them becomes easier.

The shfusion.dll is used to provide the user interface you see in explorer. If you disable the namespace extensions explorer is using the default extension to display the content of the gac.

Three ways to disable the namespace extension:

1. Rename the Desktop.ini

What you can’t see from the screenshot above is that there is a hidden file called Desktop.ini which is invoking the namespace extension.
You could rename the file with the following commands:

attrib desktop.ini -h -r -s
rename desktop.ini desktop.ini.bak

2. Add DisableCacheViewer Registry Key

Another way to disable to create a new dword key under HKLM\Software\Microsoft\Fusion\ with the nane DisableCacheViewer and set it’s [DWORD] value to 1.

3. Rename the Shfusion.dll

Last but not least you could rename the Shfusion.dll which is located in the %windir%\Microsoft.NET\Framework\vx.x.xxxx folder, where xxxx is the build number of the .NET Framework you are using.

Plain old explorer view

If you open windows explorer after one of the above procedures you will see your familiar folder structure.

 Once you disabled the namespace extension you no longer have drag and drop support for installing assemblies to the gac. Thus you probably want to re-enable the namespace extension once you have looked around.

Posted on Friday, May 5, 2006 6:19 AM | Back to top


Comments on this post: Windows Explorer and the Global Assembly Cache (GAC)

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
The 'Assembly' directory is not the only one Explorer screws around with.
It also hides the DLLCache directory so that you can not replace 'system' dlls with different versions - something you sometimes need to do when debugging a customer problem.

One solution to this is to dump Windows Explorer altogether and use a real file manager like the one in Norton NT Tools. Unfortunately Symantec no longer sell this product, but if you can find a copy it works very well ... and gives you a lot of other useful features that Microsoft dont provide.
I use this product 99.9% of the time. (even though it is 12 years old!) The one problem that forces me to use Explorer (temporarily) is when I need to copy a file and the space in use is close to a 4GB boundary. (In 1996 there was no support for drives larger than 4GB so the app thinks my 120GB drive is full.)

One more warning - if you are one of those strange folks who actually likes to store all their files under 'My Documents', that is also a 'fake' directory ... so you have to navigate to the 'real' directory instead - about 3 levels down from the top ... so not very convenient.
Left by Mike Dempsey on Apr 02, 2008 10:16 AM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
And another way is to open Visual Studio Command Prompt and run regsvr32 -u shfusion.dll.
Left by Anton Swanevelder on Oct 06, 2008 9:46 PM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
Everything is very open and very clear xplanation of issues. was truly information. Your website is very useful. Thanks for sharing
Left by tiffany on Aug 01, 2009 8:40 AM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
great article.Thank you
Left by 24 inch bar stools on Oct 24, 2009 1:36 PM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
Thank you for a great article! The software I support just went to using the Assembly area in volume and I was trying to locate one of our DLLs and was confused at the aggregate view.

This article is a shining example of the positive value of the internet!

Thanks again!
Left by Kyle on Nov 06, 2009 1:28 PM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
Thank you! This article gave me the correct answer to a problem I had all day!
Left by Rainer on Feb 15, 2010 9:27 PM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
thanks jason works like a charm,
to remove virtual drive again
SUBST L: /D
Left by bo anderson on May 31, 2010 3:10 PM

# re: Windows Explorer and the Global Assembly Cache (GAC)
Requesting Gravatar...
Thanks for making such a cool post which is really very well written.will be referring a lot of friends about this.Keep blogging
Left by Windows 7 Activation Key on Dec 12, 2010 7:29 PM

Your comment:
 (will show your gravatar)


Copyright © Hannes Pavelka | Powered by: GeeksWithBlogs.net