29. April 2009 18:52
/
lppinson
/
/
Comments (6)
Sometime we have some question that we don’t get the answer right away. This one was one of them. I often ask myself “How to get a DLL from the GAC?”, and i didn’t really search for the answer because i was able to retrieve the DLL from another location.
Recently, i had the same question once again but i wasn’t able to find the assembly anywhere else. So i finally got the answer from my college Dominic Sévigny. The trick it’s that we cannot export a DLL from the GAC from the Windows interface. So we need to do it from the DOS console. Here is the procedure to do it:
First you need to open a new command window. You need to browse to the GAC_MSIL folder (c:\Windows\assembly\GAC_MSIL)
Each assembly have it own folder. So if you need to access the assembly “CrystalDecisions.ReportAppServer.ClientDoc” you can do it by accessing the folder.
C:\Windows\assembly\GAC_MSIL>cd CrystalDecisions.ReportAppServer.ClientDoc |
Once in the folder, you should see a subfolder for each version of the assembly in the GAC.
C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc>dir Volume in drive C has no label. Volume Serial Number is C470-AE11 Directory of C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc 23/04/2009 09:55 PM <DIR> . 23/04/2009 09:55 PM <DIR> .. 23/04/2009 09:55 PM <DIR> 10.5.3700.0__692fbea5521e1304 0 File(s) 0 bytes 3 Dir(s) 38,585,462,784 bytes free |
Select the version you need by accessing the folder.
C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc>cd 10.5.3700.0__692fbea5521e1304 C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\ 10.5.3700.0__692fbea5521e1304>dir Volume in drive C has no label. Volume Serial Number is C470-AE11 Directory of C:\Windows\assembly\GAC_MSIL\CrystalDecisions.ReportAppServer.ClientDoc\ 10.5.3700.0__692fbea5521e1304 23/04/2009 09:55 PM <DIR> . 23/04/2009 09:55 PM <DIR> .. 23/04/2009 09:55 PM 57,344 CrystalDecisions.ReportAppServer.ClientDoc.dll 1 File(s) 57,344 bytes 2 Dir(s) 38,585,479,168 bytes free |
Now you have access to the DLL of the assembly you need. So you can copy the DLL, using Copy or XCopy, to the location you want
This is why i love my job i always learn new stuff everyday, even it’s something very simple!!
Regards,
Louis-Philippe
7df44b38-4269-4398-92ad-458390714291|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags :