Wednesday, 24 April 2013

Copying GAC before deployment on SharePoint Production WFEs servers

Few days back I needed to deploy few projects on production server's, since our SharePoint 2007 is properly customized and GAC is packed with custom solutions assemblies, and these solutions do get updated regularly. These DLLs depends on each other so if I update GAC with wrong version of a custom DLL it will break customized SharePoint which I don't want to happen therefore need a backup of GAC as part of backup plan.

Of course we have SharePoint Team foundation and we document each change, but when your farm is broken because of your newly deployed project solutions (which also updated few customized DLLs) you want to roll back quickly and without taking any risk of "wrong documentation" or if someone updated production server and forgot to update TFS somehow.

Copying DLLs out of GAC isn't really a difficult task and is really helpful when it comes to roll back. Follow these steps to backup everything in GAC folder or only the DLLs you think you need,

  • Click on Start and then on Run.
  • Put this command in text box and click "OK", as shown in figure below.

  • A window will appear with several folders but only folders you might need are ones shown in picture below,

  • Now you can copy all folders for backup or just find particular DLLs you need using search box. 
I personally copy all of folders and then once everything get's deployed perfectly, I delete the backup.

1 comment:

  1. If %windir%\assembly doesn't work for you then try "%windir%\assembly\GAC_MSIL" and then click on "Up" or "Back" button to go back to previous folder which is Assembly folder containing child folders, e.g. 64 bit or MSIL..