Friday, November 18, 2016

Step by step backup and Restore Global Assembly Cache (GAC) in SharePoint 2013

We know shared assemblies are stored in the global assembly cache (GAC)

Location of GAC

From .NET Framework 4

Location:C:\Windows\Microsoft.NET\assembly

In earlier versions of the .NET Framework

Location: C:\Windows\\assembly.

Assemblies are shared between all applications on the machine, which is excellent for SharePoint

Versioning is easy because the GAC can hold multiple versions of the same DLL without issues

Backup Steps

1.      Change the View

2.      Open command prompt

3.      Change Directory to Global Assembly Cache Location depend on you .NET Framework

4.      Run the following command to change the view

attrib desktop.ini -h -r -s

rename desktop.ini desktop.ini.bak

5.      Now, Go to Global Assembly Cache Location depend on you .NET Framework and copy the DLL and Past to the Backup folder.

Following types of Folder in GAC

1.      GAC

This folder contains non-native images of DLL used in .NET Framework 1.x. 

2.      GAC_32  

A 32-bit system will only have the GAC_32 directory.  A 64-bit system will have both the directory GAC_32 and GAC_64. These directories contain assemblies that are specific to 32-64 bit mode. 

3.      GAC_MSIL:

The GAC_MSIL cache contains assemblies that can be run in either 32-bit or 64-bit mode. They don’t have any dependency.

4.      NativeImage Framework Version

Native image generated for Framework version. If you have .NET Framework 1.0 and 2.0 both, then there will be two directories.

5.      Temp and Tmp

The folder GAC, GAC_32, GAC_64 and GAC_MSIL contains non-native images of the DLLs. They all contain the MSIL that will be complied into native images and placed in Native

Restore Steps

To restore just Copy the Backup folder and past to GAC

 

Thank you very much

          Fahadullah Karimi

         SharePoint Specialist

Step by step backup and Restore WSP Custom Web Part\Solutions files in SharePoint 2013 Step by step backup and Restore SharePoint_Config Database in SharePoint 2013

No comments:

Post a Comment