MattAndreko.com

"hostess is a code-slaying dragon found deep within the core of the earth, unearthing magma and vulnerabilities single handedly while using the other hand to pet his cat"

Finding DLL Files in the GAC

| Comments

So last night I was working on a project where I needed a specific version of a .net assembly that was installed somewhere on my system, but I could not locate it by a common search. Whenever I would open up C:\Windows\Assembly\ I could see the file and the multiple versions that I had installed. However, from that window, you can not copy the files out. All I wanted, was to copy the file to my local source branch, and include it in source control.

I stumbled upon an article that mentioned being able to go to:

C:\Windows\Assembly\GAC_msil

This worked out perfectly. I found the assembly, sorted through the version numbers, and copied the dll files that I needed. My app now works marvelously.

I’m guessing that I could also achieve the same results, loading the assembly from the GAC using some sort of assembly binding, but I honestly haven’t looked enough into it to figure it out, and I needed these dll files in my source control in case another machine I download it to didn’t have the libraries installed, so this method worked fine for me.

Comments