Cannot Add the Specified Assembly to the Global Assembly Cache

Cannot Add the Specified Assembly to the Global Assembly Cache

Symptoms

The installer for the Sharepoint feature fails with the error Cannot add the specified assembly to the global assembly cache: Atlassian.Confluence.SharePoint.dll.

Cause

The installer is having problems putting the assemblies in the GAC (Global Assembly Cache).

Resolution

  1. Start Confluence as both a local administrator on the machine and as an administrator within the SharePoint farm.

  2. Run setup_webparts.exe and setup_search.exe and choose uninstall for each. If it wants to install, just cancel for now as it thinks it is already uninstalled.

  3. Go to C:\Windows\Assembly and try to physically remove (right click -> uninstall) Atlassian.Confluence.SharePoint.dll and Atlassian.Confluence.SharePoint.Search.dll.

  4. Then run the installation for setup_webparts.exe and then setup_search.exe.

This problem can also happen if the assemblies were already there and the installer couldn't remove them first or otherwise replace them.

If that fails, take a look at the Manual SharePoint Feature Installation documentation.

Related articles