Friday 25 April 2014

Copy dll from GAC

Get a copy of dll in GAC (or) add Reference to a dll in GACSometimes in .net application we need to have a copy of a dll which is available in GAC. But when we view the GAC through C:\Windows\assembly folder or RunĂ  assembly.
Using this we cannot copy the dll. Only uninstall option is available.
To view the available dll using the naked eye follow the steps (to get the copy option or to copy the dll form Assembly folder)
Dot net have a dll file Shfusion.dll which is a Assembly Cache Viewer. It is located in the following path.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
1. uninstall the dll using the following command in the run dialog box.
regsvr32 -u C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
1. Now type assembly in the Run dialog box.
2. Now you will see the folder view of the GAC. copy the dll you want.
Note:
3. To get back to the previous state of view register the Shfusion dll using the following command
4. regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll
GAC:
c:\WINDOWS\assembly
and after it’s now here:
C:\WINDOWS\Microsoft.NET\assembly
==========================================
Or
===============================================
How to read dll from gac
copy dll from gac
copy dll from assembly
Go to Run
Type:
C:\windows\assembly\gac_msil
Now you can copy any dll.