Getting a copy of a DLL that's only in the GAC

Ok probably there is a simpeler way of doing this but i googled for it and couldn't find it. So here is the story.

I needed a specific DLL that was placed in the GAC by the install of BizTalk. I needed the DLL cause I needed to ad a reference in my C# project. If anybody knows how to add a Reference to a DLL tha's in the GAC I'll be interested as well.

But I couldn't find a way to do it so I needed a copy of that dll.

So you use explorer and Browse to the GAC.

WindowsGac.JPG

But you can't make a copy of it, You can see all the details and stuff but you cannot copy it. But if you open a Command prompt and go to the same directory stuff looks different....

CommandGac.JPG

And for sure when you go to the correct directory you can get the underlying DLL.

CommandGac1.JPG

There are probably easier ways of doing this but I thought I share this method of doing it.

 

Attachment: WindowsGac.JPG
Published Wed, Jul 12 2006 9:14 AM by Patrick Wellink
Filed under: ,

Comments

# Great functionality for every BizTalk Developer.(XpathMutatorStream)

Wednesday, July 12, 2006 12:42 AM by Patrick Wellink
Ok first of all I have to give lots of credit to Martijn Hogendoorn for helping me with this one. I had...

# re: Getting a copy of a DLL that's only in the GAC

Wednesday, July 12, 2006 12:48 AM by Ramon Smits
There is a registry option that disables this explorer behaviour and then you see the same stuff as on the command-line. But I cannot remember exactly what the key is.

# re: Getting a copy of a DLL that's only in the GAC

Wednesday, July 12, 2006 1:11 AM by Patrick Wellink
Ok if anybody knows wich registry entry that is I would be interested......

# re: Getting a copy of a DLL that's only in the GAC

Friday, July 14, 2006 1:11 AM by Marc Jacobi
I usually make a copy of the entire gac (recursively). Just make a .cmd batch file that you rerun after you install a new product you want to develop against.

# re: Getting a copy of a DLL that's only in the GAC

Wednesday, July 26, 2006 11:01 PM by Patrick Wellink
I got a mail from somebody who couldn't react on the post. (For some reason it's disabled. But here is the mail I got.

Onderstaande url vertelt een heel verhaal over de GAC. Net voor hoofdstuk 4 staat de registry key waarmee je de GAC in z'n originele vorm in Windows Explorer ziet.



http://www.codeproject.com/dotnet/DemystifyGAC.asp?df=100&forumid=15829&exp=0&select=856234


Thanks Michel

# Getting a copy of a DLL in the GAC

Wednesday, August 09, 2006 12:47 AM by Jan Schreuder on .Net
A few weeks ago, Patrick Wellink blogged about how you would get a copy of a DLL when it's in the GAC....

# Visualizing the benefit of forwardonly streaming in custom pipeline components

Thursday, December 20, 2007 10:51 PM by Be Logical - Be Connected

When doing custom pipeline component development you need to be aware of the forward-only streaming best

# Updating repeating nodes in an XML Document with the same value using XPathMutatorStream « Connected Thoughts

Pingback from  Updating repeating nodes in an XML Document with the same value using XPathMutatorStream « Connected Thoughts

# PiRootOfPi Blog » Blog Archive » Copy Files From Global Assembly Cache (GAC)

Pingback from  PiRootOfPi Blog  » Blog Archive   » Copy Files From Global Assembly Cache (GAC)

# SSIS100: What Reference To Add To Create Component? | keyongtech

Pingback from  SSIS100: What Reference To Add To Create Component? | keyongtech

# Pearl Tech » Blog Archive » BizTalk Pipeline Out Of Memory

Monday, September 21, 2009 7:59 PM by Pearl Tech » Blog Archive » BizTalk Pipeline Out Of Memory

Pingback from  Pearl Tech  » Blog Archive   » BizTalk Pipeline Out Of Memory

# re: Getting a copy of a DLL that's only in the GAC

Wednesday, June 09, 2010 12:17 AM by Rick

xcopy "c:\windows\assembly\gac_XXXX" /e

works well if you need copy everything to your current directory. (example run from c:\temp)

XXXX depending on dll location you need. (example GAC_64; GAC_32; GAC_MSIL, etc)

# re: Getting a copy of a DLL that's only in the GAC

Tuesday, July 13, 2010 9:14 PM by Naveed Mazhar

Hello,

I found the simple solution of copying a dll, at the following link:

www.tipscentre.net/.../Copy-DLL-From-GAC-Assembly.aspx

Hope this helps.

# re: Getting a copy of a DLL that's only in the GAC

Thursday, January 06, 2011 9:47 AM by Tania

Hi Wellink, thanks for this useful tips. Your idea helped me to build a full dotnet project with confidence. Thanks for sharing your knowledge with us. Expecting more from you.

Can anyone say in which registry entry that I would be interested?

godwinsblog.cdtech.in/.../requested-page-cannot-be-accessed.html

# re: Getting a copy of a DLL that's only in the GAC

Thursday, March 10, 2011 9:56 AM by Harpreet

Hi ,We can even copy the dll from gac by going through the windows explorer .But in this case you need to go to "C:\WINDOWS\assembly\temp" and then can move one step back where you would find the folder many folders but "GAC_MSIL" is the one which contains all the folder for all the dll in gac .You can explore further to get the required dll [ Eg : (Microsoft.BizTalk.Streaming\3.0.1.0__31bf3856ad364e35) to get the Microsoft.BizTalk.Streaming.dll .

# re: Getting a copy of a DLL that's only in the GAC

Friday, November 18, 2011 10:24 PM by randy k

You can also do this the "exporer" way..

Must be done from a "Run" box:

Type in "c:\windows\assembly\gac_msil"

This will open the GAC in a reguarl window allowing you to see the underlying dll's

Leave a Comment

(required) 
(required) 
(optional)
(required) 
Please add 1 and 4 and type the answer here: