SharePoint Products

compelling add-ons for SharePoint

FAQ: Cannot add or remove the specified assembly

When installing, uninstalling or upgrade CopyMove 2010 with the supplied installation scripts, you see one of the following error messages:

  • Cannot add the specified assembly to the global assembly cache: <assembly>
  • Cannot remove the specified assembly from the global assembly cache: <assembly>

where <assembly> is one of the following:

  • SharePointProducts.CopyMove.dll
  • SharePointProducts.CopyMove.Workflow.dll
  • SharePointProducts.Platform.dll
  • SharePointProducts.Blocks.dll
  • SharePointProducts.Common.dll

The following screen shot illustrates the nature of the errors.

Cause

One or more processes has acquired a lock on the <assembly> and the SharePoint 2010 solutions framework in turn fails to install or uninstall the .NET assembly.

Resolution

First, try this:

  1. Reset the IIS and the SharePoint timer service on all servers in the farm. You may use the Reset.cmd script supplied with CopyMove 2010.
  2. Uninstall CopyMove 2010 using the Uninstall.cmd script.
  3. Install CopyMove 2010 again.

If the error persists use a bigger hammer as follows:

  1. Download and run the script RemoveCopyMove2010AssembliesFromGAC.cmd on all servers in the farm. The script will attempt to remove all CopyMove 2010 assemblies from the Global Assembly Cache. Note that it might be necessary to run the script twice before all assemblies are gone. Anyway, the script will display a success message when they are all gone.
  2. Uninstall CopyMove 2010 using the Uninstall.cmd script. Ignore any error messages.
  3. Verify that the solution packages sharepointproducts_platform.wsp and sharepointproducts_copymove.wsp have been retracted and removed from the farm.
  4. Install CopyMove 2010 again.