Wednesday, May 5, 2010

How to backup a DLL from GAC to another directory?

Recently, one of my friends came up with a requirement where she wanted to take a backup of an existing .Net assembly that was already deployed in Global Assembly Cache (GAC) earlier.

When she asked me this question..I thought to myself that this should not be so tough..well it proved so too at the end.

Finally, this is how it could be done ( way of achieving this!!)

If you go to Windows  Run Assembly you will see this screenshot

Now, go to the Command Prompt on your system and type
cd windows\assembly ENTER (Key)

Next, type GAC in the CMD prompt, hit ENTER

Suppose, you want to copy "Extensibility" DLL from GAC to another directory, then type cd Extensibility (you can type Ex and press Tab on your keyboard to navigate faster) to enter the folder hierarchy.

Note: This would be your custom DLL instead of "Extensibility"

Press cd + Tab (keyboard) and hit ENTER again.

Once there, we need to copy!!

In CMD window, type: copy extensibility.dll C:\myCustomDir. Hit ENTER key

Go and check in that directory, you will find the Extensibility dll nicely lazing around..

Hope this post helps you all SharePoint 2007 & Dotnet developers as well as admins in doing this simple but at times life-saving act.

1 comment:

Sofia said...

Very useful post. I would also add connecting to GAC_MSIL folder for custom DLLs.
Thanks a lot for sharing this information.


Related Posts with Thumbnails