I have a problem with a update of a solution on farm. So we have changed some features and added two features. The main changes were done to the main feature of the solution.
On our test cloud it workes fine. On our test environment it first works fine, but after a redeployment it have not worked any more. The updated features were not completly installed. This happends at the customer environment too and some other test deployments have got the same problem.
So we have changed the update script we provided. In this point we have a sleep time between the Update-SPSolution command and the Upgrade of all features of the deployed features. We raised the sleep time from 20 seconds to 5 minutes.
A new update now went fine, but we wanted to recreate the old state and installed the solution with the old update file again, but this works fine too ;-). (yeah thats a worse situation)
The important update process looks this way:
Update-SPSolution -LiteralPath $wspFile -Identity $fileName -Force -GACDeployment -ErrorAction:Stop -ErrorVariable:updateError -Confirm:$false
Start-Sleep -Seconds $sleep
$site = Get-SPSite $SiteUrl
$siteFeatureToUpgrade = $site.QueryFeatures("Site", $true);
foreach($f in $siteFeatureToUpgrade)
{
$f.Upgrade($false);
}
The value of sleep is once 20 and once 300. Anyway, could it be that this sleep time resolves the update issue? Cause I dont think so.
Thank you very much.