Backup an assembly from the GAC

Scenario : You build a new version of an assembly that needs to be deployed to GAC. You need to make sure you have a roll-back plan, but the original file that you added to the GAC (the previous version) is no longer available. It *is*, however, still in the GAC.

Problem : Windows Explorer won’t let you copy an assembly from the “C:\windows\assembly” folder.

Solution : The Command Prompt. Too many peaople, in my opinion, are way too fond of using the GUI for everything under the sun. I grew up with DOS, and was lucky enough to have been able to get comfortable with doing a lot at the command line (the same with my Linux boxes, btw).

To copy the file you want out of the gac, start a command prompt and type the following :

c:
cd\\
cd windows\\assembly\\GAC
cd
cd
copy .dll c:\\

On lines 4 and 5 above, tab completion (on later versions of windows, this is enabled by default) will help you enormously. Otherwise, you’ll need to list the directory contents a couple of times to figure out the version and assembly names.