I am sure most of the people will be knowing but this is for few crazy people like me who are always behind learning new things. Recently i ran into a scenario where i need to build a sharepoint project on a local machine (one which has windows XP and no SharePoint Server installed). Obviously the build will fail coz of missing reference’s for Microsoft.SharePoint.dll. Since my sharepoint development server was down for some time i had to get the dll from my colleague.
Given below are the steps to take a backup of a dll from the GAC or Assembly
1. To get dll from assembly, open run window and type “cmd” to open command window.
2. Navigate it to c:\windows\assembly in the command prompt
3. Type “cd GAC_MSIL”
4. Then type cd dllname; [Eg: In my case since dll name is Policies, it will be “cd Policies”]
5. Then type “cd “ and then space and press tab so that it will automatically populate the directories(Version) associated with that dll . Usually it will be only one. In the below picture you can see that it starts with “184.108.40.206_…..”
6. For copying that dll to c:\ , type “copy dllname.dll c:\destfoldername
7. Important: Type “del dllname.dll” in the command prompt as the last step. If you did not delete the dll from this folder, you cannot install the dll with same name of another version. You might get the error “Cannot create/shadow copy ‘File Name’ when that file already exists”.