1

I am getting below error when I tried to install the WSP in staging environment.

Add-SPSolution : Operation is not valid due to the current state of the object. At line:1 char:1 + Add-SPSolution -LiteralPath "D:\StagePackage\SharePoint.ServiceSett ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...dletAddSolution:SPCmdletAddSolution) [
Add-SPSolution], InvalidOperationException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSolution

I am not sure what is the exact issue here, I tried to install the same package in my dev/test environment its working fine

Below is the ULS log

Deleting the SPPersistedObject, SPSolutionLanguagePack Name=0. 5f1402fb-84e7-41d1-abeb-da9cdc500246

Deleting the SPPersistedObject, SPSolution Name=sharepoint.mysettings.wsp. 5f1402fb-84e7-41d1-abeb-da9cdc500246

System.InvalidOperationException: Operation is not valid due to the current state of the object. at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetParent(SPPersistedObject persistedObject) at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.get_DisplayName() at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.SetSolutionFile(SPFarmSolutionPackage solnPackage, String path, String solutionName, Boolean isRestore)
at Microsoft.SharePoint.Administration.SPSolution.AddLanguagePack(SPFarmSolutionPackage solnPackage, String path, UInt32 lcid, String name, Boolean isRestore) at Microsoft.SharePoint.Administration.SPSolutionCollection.Add(String path, String name, UInt32 lcid, Boolean isRestore) at Microsoft.SharePoint.Administration.SPSolutionCollection.Add(String path, UInt32 lcid) at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1.InternalProcessRecord() at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord() 5f1402fb-84e7-41d1-abeb-da9cdc500246

Error Category: InvalidData Target Object Microsoft.SharePoint.PowerShell.SPCmdletAddSolution Details NULL RecommendedAction NULL 5f1402fb-84e7-41d1-abeb-da9cdc500246

I tried deploying the package with stsadm command also and there also I am getting error. Its 2013 solution and scoped at farm level

I am completely running out of ideas can anyone please help me on this.

  • Did VS created the package without any errors or warnings? – Kristaps Vilerts Aug 8 '18 at 6:43