Get dll which is installed in GAC or take backup of installed dll from GAC

By Sigar Dave No comments
Filed under: SharePoint | Tags: dll assembly GAC SharePoint backup |

Let’s say, you have installed dll in the assembly and you want to retrieve the dll back from it.

If you got me right and looking for the same, then you are at the right place.

I will explain with the scenario, what I did. I have policies.dll installed in my assembly.

Assembly

  1. To get dll from assembly, open run window and type “cmd” to open command window.
  2. Navigate it to c:windowsassembly 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 .
  6. Usually it will be only one. In the below picture you can see that it starts with “1.0.0.0_…..”

Command Prompt

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”.

If you got me right and looking for the same, then you are at the right place.

I will explain with the scenario, what I did. I have policies.dll installed in my assembly.

Assembly

  1. To get dll from assembly, open run window and type “cmd” to open command window.
  2. Navigate it to c:windowsassembly 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 .
  6. Usually it will be only one. In the below picture you can see that it starts with “1.0.0.0_…..”

Command Prompt

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”.

Leave a Reply