Extracting assemblies from the Global Assembly Cache in Windows Explorer

Posted on 7/22/2008

Here's a quick tip I accidentally discovered about extracting assemblies from .NET's Global Assembly Cache (GAC).  In the past, when I wanted to extract .NET assemblies from the GAC, I was accustomed to opening a command window and executing copy commands.  It's tedious, but it works. This is necessary because of shfusion (shfusion.dll), a Windows Explorer extension that controls the interaction of the the %windir%\assembly folder and prevents extraction of its assemblies. You can add assemblies into the GAC from Windows Explorer, but you can't extract them.

I've had to call Microsoft support in the past for one issue or another, and on one call I watched them unregister shfusion.dll (regsvr32 /u shfushion.dll) in order to extract multiple assemblies out of the GAC. However, I remember trying this on another machine one time and it didn't quite work.

I recently experienced the joy of needing to extract a handful of assemblies out of the GAC to manually reinstall an application. After using the command console a couple times, I thought I'd try to open one of the paths from the run box and to my amazement it worked.  It opened the GAC in Windows Explorer and bypassed shfusion. I've confirmed this works on XP, Vista and Server 2003.

Finally, the tip

Open the run command box (or quick search box in Vista)  and enter the following.