Posted by: R Manimaran | August 5, 2008

Get a copy of dll in GAC (or) add Reference to a dll in GAC

Sometimes 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 it will show like this

Using this we cannot copy the dll. Only uninstall option is available.

To view the available dll using the naked eye follow the steps

Dot net have a dll file Shfusion.dll which is a Assembly Cache Viewer. It is located in the following path.


  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.


To get back to the previous state of view register the Shfusion dll using the following command

regsvr32 C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\shfusion.dll



  1. That’s really cool. Thanks, this informration was helpful to me.

  2. It will be much easier to use the SUBST DOS Command (
    As an example, use “subst x: C:\Windows\assembly”.

  3. Thanks for the info in this article. Adriaan, your tip was helpful too. But the SUBST would not have worked for me, because I needed to add a reference to a DLL in the GAC and I needed to use the “original” path so it would work when I deploy the program to another computer. But still, that was a very cool command. Thanks!

  4. thanks. this small tip totally saved me 3+ hours. 🙂

  5. very help full topic yar.

  6. well yar.

  7. very helpful, thank you!

  8. Got a question. As soon as the GAC is converted into folder structure only those assemblies having empty Processor Architecture show up. Those having values such as AMD64, MSIL do not get listed. Where can I find those missing assemblies?

    Thank you in advance for your assistance.


    • Hi Nirav,
      I have checked. After i un-install the Shfusion dll, i got the MSIL processor architecture assemblies too. It is in the separate folder. For me it came under GAC_MSIL folder. This folder is located under the root folder of the assembly.
      Check it.

  9. […] by ken zheng on May 14, 2009 Today I found this blog to show you how to get dll from GAC you can run Dot net have a dll file Shfusion.dll which is a […]

  10. Great job!!!

  11. Awesome man.

  12. Thanks Buddy , it works.

  13. Sounds good, but the list still showed assemblies after unregistering. I am using Windows Vista, if that matters.

  14. Thanks….helps me a lot

  15. Thanks for the info. I could not figure out why drag and drop was not working, now I know why.

  16. […] ref: … ce-to-a-dll-in-gac/ […]


  18. In case you’re curious, the location of the GAC is different in 4.0. Before 4.0 the GAC was located here:
    and after it’s now here:

    Personally, I find the easiest way to copy a dll out of the GAC is to use the command line. Just don’t use windows explorer to view the files since the assembly viewer takes over. If your not familiar with command line viewing just go:
    Start-> Run-> cmd ->enter
    type these commands (hit enter after each one)
    cd c:\WINDOWS\assembly
    using these commands you can easily navigate the gac. If you don’t know cd is short for “change directory” and dir is short for “directory listing” c: just tells the computer to go to the c: drive in case you’re not already on it.

    I talk about this and a number of other issues on my blog:

    Best of luck!
    — Anthony

  19. very helpfull and good rank in Google !

  20. That was helpful,
    Thank you

  21. Cool site goodluck 🙂 golden preteens lolita top 161 14 yr lolita bbs 8-)) free lolita top site 119 www lolita nu com :-]] nymphet lolita pic galleries 785 lolitas kids nude beach 3805 lolita models sun bbs =O sexy lolitas models videos %-(( all lolitas pedo sites 16181 lolita no nude child :-OOO

  22. Have you ever tried to migrate from Crystal 10.5 to Crystal 12 with VS 2008? It’s a royal pain. But this little trick has helped… thanks!

  23. how to get the same in windows 2008 server

    • Hi Gnanasekhar,
      I tried the same thing in Windows Server 2008 too. It is working fine. Check it and let me know.
      regsvr32 /u C:\Windows\Microsoft.NET\Framework\v2.0.50727\shfusion.dll

      regsvr32 C:\Windows\Microsoft.NET\Framework\v2.0.50727\shfusion.dll

  24. Thank you very much… this topic helped me. 🙂


  25. On microsofts website it says to copy the dlls from the gac to the public assemblies folder to be able to access them from your project. Im working on a dsf project so this helped me to know were the folder for gac was. So thanks.
    I could just copy the dll files using commmand line though so i dont have to worry about using explorer as long as i know the path and it wont show them as libraries as explorer would.

    • Hi Jeffery,
      I did not mention in this blog that this is the only way.. We can also do it using Command prompt(C:\Windows\Microsoft.NET\assembly\GAC_32). This is an alternative way to copy using the Explorer view instead of using command prompt commands.

  26. Great job. I could not find the .dll’s I looked for on my harddrive, but could find them in the GAC. Using your method I succeeded to copy the .dll’s to the GAC on my application server.

  27. These are truly fantastic ideas in about blogging. You have touched some nice points here.

    Any way keep up wrinting.

  28. Howdy I am so delighted I found your weblog, I really found you by
    accident, while I was researching on Google for something else, Nonetheless
    I am here now and would just like to say kudos for a remarkable post and a
    all round thrilling blog (I also love the theme/design),
    I don’t have time to look over it all at the minute but I have saved it and also added in your RSS feeds,
    so when I have time I will be back to read a great deal more, Please do keep
    up the excellent b.

  29. Spot on with this write-up, I truly think this site needs far more attention. I’ll probably be returning to read through more, thanks for the advice!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s


%d bloggers like this: