How to take out the dlls from GAC ?

Once I had a need to see the contents of an out-of-the-box SharePoint assembly (which was installed in GAC) using .NET Reflector tool. Assembly was: Microsoft.SharePoint.AdministrationOperation. Unfortunately we can’t locate this assembly in the physical file system of my SharePoint server. The only way would be take this assembly from outside the GAC – but how?

clip_image002

Since, the default view of the GAC folder is read-only I can’t copy it from there directly. Then, what I did was, opened the GAC in command prompt.

Here we can see the real anatomy of GAC folder.

clip_image004

 And if we want to take that assembly, we have to go inside GAC_MSIL and the version number folder, which will be like below.

clip_image006

And then we can copy this assembly to other file location. (here I am copying it to C:\ drive)

clip_image008

That was the way I did it, but if we want to see the folder-wise structure of GAC, we can do it through by adding a registry entry. You can simply go to, HKLM\Software\Microsoft\Fusion and create a DWORD value named "DisableCacheViewer" and set it to value 1.

After that, open another instance of windows explorer, explore to c:\windows\assembly now and you see magic there. If you set the value of that DWORD value to 0 then you can switch back to the read-only view.

Please see the below screen shot to know how it will look like.

clip_image010