Thursday, November 5, 2015

Accessing the GAC folder structure using Windows Explorer

Many of us have accessed the Global Assembly Cache (GAC) for troubleshooting purposes. But when viewed using the Windows Explorer (C:\Windows\assembly), all the assemblies are rendered in a different way by the Operating System. This is not the actual physical structure of the GAC folder.

Try coping the same path and paste it on a browser (Chrome or Firefox) or access the path using command line, You might be surprised to see the real structure of the GAC folder. What you see in the Windows explorer is an aggregated view of the inner folders

To enable viewing the actual folder structure of the GAC from the windpows explorer, go to the Windows registry editor (regedit), create a string value key by the name "DisableCacheViewer" inside "HKEY_LOCAL_MACHINE\Software\Microsoft\Fusion" and set the value to "1". Now browse the same folder using windows explorer.

The earlier mentioned default nature of the GAC folder is achieved using the shell namespace extension. By using this, you can create custom functionality for windows explorer.