1

I created a new feature and performed a Uninstall/Remove/Add/Install-SPSolution using PowerShell to deploy it. The solution deployed correctly and the feature was added to the 14 hive, but did not appear in the UI until I performed an Update-SPSolution. Only after I performed this update was the feature usable.

Why on earth would an update be required in order to make the feature visible, when the solution has just been freshly installed?

1
  • Ok, an update that may or may not be helpful - tried the same procedure on a different (but near-identical) test environment, and the feature still is not visible in the UI even with the Update command. There are already features existing in this solution and they deploy fine, but this one is proving problematic.
    – Vassal
    Aug 13, 2013 at 15:44

1 Answer 1

0

Just run Update-SPSolution and theh Install-SPFeature

Here is my code:

$WSPpath = "$($dataFolder)\WSP"
$wspWeb = Get-SPWeb $SiteUrl

foreach($wsp in Get-ChildItem -Path $WSPpath -Exclude "*.ps1")
{
       $sol = $null


       $sol = Get-SPSolution -Identity $wsp.Name -ErrorAction SilentlyContinue

       if($sol -ne $null)
       {
             Write-Output "Updating solution $($wsp.FullName)"
             Update-SPSolution -LiteralPath $wsp.FullName -Identity $wsp.Name -GACDeployment -Force

       }
       else
       {
             Write-Output "Installing solution $($wsp.FullName)"
             $sol = Add-SPSolution -LiteralPath $wsp.FullName

           if($sol.ContainsWebApplicationResource)
           {
               Install-SPSolution -Identity $sol -WebApplication $wspWeb.Site.WebApplication.Url -GACDeployment
           }
           else
           {
                 Install-SPSolution -Identity $sol -GACDeployment
           }
       }

        $sol = Get-SPSolution $wsp.Name
        while($sol.JobExists)
        {
            Write-Output "Installing solution $($wsp.Name) ...."
            Start-Sleep -Seconds 5
            $sol = Get-SPSolution $wsp.Name
        }
}

Install-SPFeature -AllExistingFeatures

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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