Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having some issues which I think are caused by some poor deployments. I'm trying to remove them but I'm running into an error.

Uninstall-SPUserSolution -Identity WspImportProject1.wsp -Site http://test.foo.com

Uninstall-SPUserSolution : Unable to access web scoped feature (Id: c0cd4001-2a59-4c05-b243-81a701533601) because it references a non-existent or broken web (Id: f5bb9b29-344b-408b-8716-4a02c384f0c2) on site 'http://test.foo.com'.  Exception: System.ArgumentException: Value does not fall within the expected range.
   at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
   at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)
At line:1 char:25
+ Uninstall-SPUserSolution <<<<  -Identity WspImportProject1.wsp -Site http://test.foo.com
    + CategoryInfo          : InvalidData: (Microsoft.Share...allUserSolution:SPCmdletUninstallUserSolution) [Uninstall-SPUserSolution], SPFeatureIsOrphanedException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletUninstallUserSolution

When I've googled this problem, I've found a bunch of information saying that I need to restore the site first and then remove the solution, which is counter-intuitive. I also see no way to restore the site.

Does anyone know how to fix this problem? It is only growing worse as I try new solutions which also don't work, leaving my sharepoint installation cluttered with failed code.

This is for my response to Meyer Denney

Hey Meyer, Thank you for looking into my problem. I tried the commands you gave but they did not find the solution, probably because these are UserSolutions instead of Solutions.

Compare:

These are the solutions that I cannot remove due to the above error:

PS C:\Users\Sam\Downloads> Get-SPUserSolution -site http://test.foo.com

Name                           SolutionId                           Status
----                           ----------                           ------
audit-demo-3.wsp               7b8a210d-058a-42be-8ad3-b5ccc2338f21 Activated
audit-demo-3-12c.wsp           2dc97848-10ac-47ea-a236-c876c18801a2 Deactivated
WspImportProject1.wsp          2dc97848-10ac-47ea-a236-c876c18801a2 Activated

These solutions are fine and I'm able to remove them through various methods:

PS C:\Users\Sam\Downloads> Get-SPSolution

Name                           SolutionId                           Deployed
----                           ----------                           --------
fooauditsystem.wsp             12ae832d-5a46-40a0-b6cc-1953d23efe50 True
auditbuttoncustomaction.wsp    7556915f-a042-4f02-903f-665594c8c5b9 True

PS C:\Users\Sam\Downloads> stsadm -o enumsolutions

<Solutions Count="2">
   <Solution Name="fooauditsystem.wsp">
      <Id>12ae832d-5a46-40a0-b6cc-1953d23efe50</Id>
      <File>fooauditsystem.wsp</File>
      <Deployed>TRUE</Deployed>
      <WebApplicationSpecific>FALSE</WebApplicationSpecific>
      <ContainsGlobalAssembly>TRUE</ContainsGlobalAssembly>
      <ContainsCodeAccessSecurityPolicy>FALSE</ContainsCodeAccessSecurityPolicy>
      <LastOperationResult>DeploymentSucceeded</LastOperationResult>
      <LastOperationTime>3/16/2012 12:28 PM</LastOperationTime>
   </Solution>
   <Solution Name="auditbuttoncustomaction.wsp">
      <Id>7556915f-a042-4f02-903f-665594c8c5b9</Id>
      <File>auditbuttoncustomaction.wsp</File>
      <Deployed>TRUE</Deployed>
      <WebApplicationSpecific>FALSE</WebApplicationSpecific>
      <ContainsGlobalAssembly>TRUE</ContainsGlobalAssembly>
      <ContainsCodeAccessSecurityPolicy>FALSE</ContainsCodeAccessSecurityPolicy>
      <LastOperationResult>DeploymentSucceeded</LastOperationResult>
      <LastOperationTime>3/16/2012 12:03 PM</LastOperationTime>
   </Solution>
</Solutions>
share|improve this question
add comment

1 Answer

In SharePoint Management Shell, try removing them with the following commands:

stsadm –o retractsolution –name MySharePointSolutionPackage.wsp –url http://webapplication –immediate

stsadm –o deletesolution –name MySharePointSolutionPackage.wsp
share|improve this answer
    
Hey Meyer thank you for your help. Please see my edit to the original post. –  samspot Mar 19 '12 at 15:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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