WSP Deployment error in Sharepoint 2013

rajiv kumar 21 Reputation points

When we are trying to deploy a WSP , below is the error message :

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.PowerShell.SPCmdletAddSolution.CreateDataObject()
at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1.InternalProcessRecord()
at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()

Tried the below but could not help:

1) Restarted Timer service
2) Deployed using PowerSHell / Directly with Visual studio
3) Restarted IIS
4) Cleared Timer Job cache
5) Restarted server
6) Executed configuration wizard

Below are the other observations:

  1. Event Viewer showing the error “The SharePoint Timer Service service terminated unexpectedly. It has done this 12 time(s). The following corrective action will be taken in 30000 milliseconds: Restart the service.” Every 3 mins.,, Event ID 7031
  2. All the SP services are running as expected
SharePoint Server Development
SharePoint Server Development
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Development: The process of researching, productizing, and refining new or existing technologies.
1,557 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,764 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sharath Kumar Aluri 3,071 Reputation points

    Make sure the timer service running service account is placed in all server's Local Admin Group and make sure all the timer services are running from your SharePoint Farm.

    $farm  = Get-SPFarm 
    $disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"} 
    if ($disabledTimers -ne $null) 
        foreach ($timer in $disabledTimers) 
            Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status 
            Write-Host "Attempting to set the status of the service instance to online" 
            $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online 
        Write-Host "All Timer Service Instances in the farm are online! No problems found" 

    Try clearing the config cache using below article script and then try again:

    Thanks & Regards,

    0 comments No comments