Tuesday, May 24, 2016

Extract GAC DLL

Most of the times developers need to extract/copy dlls from GAC. The first step is to see whether these dlls are 32 bit or 64 bit or MSIL. So the first step is to open the command prompt and move to assembly folder. To do this, you need to run following command,

cd c:\Windows\assembly

Now you can see how many types of of assembly folders exists (Windows explorer does not let you select these folders). run following command and you will see the results as below,

dir




For me, There are three folders to consider,

  1. GAC
  2. GAC_32
  3. GAC_64
  4. GAC_MSIL
we can now copy dlls from where you need e.g. if dll is 64 bit compiled, you can type, c:\windows\assembly\GAC_64 in the explorer and you can copy specific dll from there.

Problem

Some times when you open the inner folders of assembly, it gives you error and can't let you open the inner folders. You can face this issue,



Solution

There are three solutions to actually navigate into inner folders of assembly.
  1. Modifying The Registry
  2. Renaming Desktop.ini
  3. Uninstalling SHFusion.dll
I normally use the first method so i will only explain the first method below.

Modifying the Registry

In the Run, type REGEDIT and press enter. This will open up windows registry editor. Navigate to key "HKEY_Local_Machine\Software\Microsoft\Fusion\", Right click on the Fusion directory and select New->DWord value,


Name new Dword as "DisableCacheViewer" and give it value of 1. Now you are good to go and can copy any dll from GAC folder.

No comments:

Post a Comment