Thursday, May 26, 2011

Copy a DLL from the GAC

Need a DLL but you don’t know the exact location? Instead of searching through all your folders, just extract it from the Global Assembly Cache(GAC).

  • Open a command prompt(as an administrator)
    • run > cmd
  • Navigate to assembly and gac folder
    • cd windows\assembly\gac
  • Navigate further down to the desired assembly >
    • dir <assembly name initials>
    • cd <assembly name>
  • Keep on doing this until you find the required .dll file
  • Then copy it
    • copy <assembly dll> C:\temp\

Simple and effective!


Dave Van den Eynde said...

That only works if the DLL you need is in the GAC, of course.

Bart Wullems said...

Indeed. But for DLL's that don't live in the GAC, you know the location most of the time.