Error: Cannot add the specified assembly to the global assembly cache

Sometimes when deploy farm solution to a multiple machines environment, the error will occur:


You may check the ULS Log to find error details. But in my case, it is not useful. The error log just tell me something is conflicted.

As the screenshot indicated, only one of my machine is failed to deploy solution. Another one is deployed successfully.

It is what I do to resolve it:

  1.  Login the machine with error, open DOS prompt with administrator permission, run this command line:
    “C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN\stsadm.exe" -o retractsolution -name YourWSPfile.wsp -local
    It will try to retract the related dll (most of the case is YourWSPfile.dll) from the local machine only. It is what I got:

    RetractionFailedCouldNotRemoveFile : SERVER02: Error: Cannot remove the specif
    ied assembly from the global assembly cache: YourWSPfile.dll.

    yourwspfile.wsp: Operation completed with errors.

  2. Again there is no useful detail in ULS log. But I remember the deployment is actually processed by Timer service. So I open the services.msc in error server, restart the “SharePoint 2010 Timer" service. Then run the command in step 1 again. This time it return:
    Operation completed successfully.
  3. Then I deploy the solution again by click the “Deploy Solution" in solution management form (in the screenshot provided). Solution is now deployed successfully to all machines.


在下方填入你的資料或按右方圖示以社群網站登入: 標誌

您的留言將使用 帳號。 登出 /  變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 /  變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 /  變更 )


您的留言將使用 Facebook 帳號。 登出 /  變更 )


連結到 %s

%d 位部落客按了讚: