7

I'm trying to retract a solution. I tried both ways:

  1. Central AdministrationSystem SettingsManage farm solutionsexample.wspRetract Solution.

    The status indicates "Retracting(scheduled at 4/3/2015 10:08 AM )". No errors, nothing. If I refresh the page, the status is happily back at "Deployed".

  2. With PowerShell:

    Uninstall-SPSolution example.wsp -WebApplication http://example-site/
    

    It requests to confirm the action, which I do. No errors displayed here either. On the other hand:

    Remove-SPSolution example.wsp
    

    returns this error:

    Remove-SPSolution : The solution "example.wsp" has been deployed in the farm. Please retract the deployment before removing the solution. You can also use the -override parameter to forcibly remove the solution, but you will not be able to retract the solution deployment. [...]

There is a log entry in Windows Events which seems relevant but that I don't understand:

The Execute method of job definition Microsoft.SharePoint.Administration.SPSolutionDeploymentJobDefinition (ID 77d62471-ad14-499c-8eb3-5b5f2a20b6e0) threw an exception. More information is included below.

Requested registry access is not allowed.

So:

  • What is happening here?

  • Do I run Remove-SPSolution with the -override parameter, or this is a risky thing which can lead to even more problems?


I ended up calling Remove-SPSolution with -Force parameter, which seems to do what I need. Still, I suppose this is not what one is expected to do in production, and I'm curious to know what should be done if the same problem occurs in an actual production environment.

4

Some notes that may help here:

  1. A solution is first added (installed) and then deployed.
  2. To remove a solution, you must first retract it, and then uninstall it.
  3. A solution can be deployed either globaly or on a Web app basis (depending on its content, so it's not your call, but an inherent property of the WSP).
  4. If you retract a solution deployed on a Web app basis, but that has been deployed to all Web app, you must retract it from all Web apps before uninstalling it.
2

I have faced a similar issue couple of days back. For couple of reasons the related DLLs will not be un-installed from GAC.

I deleted the solution respective DLLs from the GAC forcefully followed by an IIS Reset. It worked for me, Hopefully that's the solution for your scenario.

  • This doesn't provide an answer to any of the two questions asked. I never asked what should I do to remove the solution, but why wasn't it removed and what are the consequences of -override/-Force parameter. – Arseni Mourzenko Apr 8 '15 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.