3

In an effort to use WebConfigModifications less, I am trying to move some binding redirects and safe control entries into the solution manifest. The DeploymentTarget of the assembies is GlobalAssemblyCache.

The solution is being installed using both the -GACDeployment and -AllWebApplications flags.

After making this change (and commenting out the WebConfigModifications code), the solution is in Central Admin (showing as activated on the web application), but the Web App features are not showing up in Central Admin. The web config changes are occurring as expected, and ULS confirms that I'm not starting up any of the web config timer jobs (it's a farm test)

I can access the features via Get-SPFeature, and I can confirm that they are not hidden.

7
  • It seems to work fine on my single dev server, but not on the multi-server farm. I tried deploying the solution to the Central Admin web app (as well as the content web app) in the multi-server farm, and that seems to fix it. Is that how it should be, or is there perhaps something broken on my farm?
    – lgaud
    Jul 15, 2013 at 13:32
  • 1
    In a multi-server farm scenario, you need to deploy solutions to application server. Jul 15, 2013 at 14:02
  • Is the best way to do that to do to Install-SPSolutions, one to -AllWebApplications and one to the Central Admin web app? I'm trying out something like : $centralAdmin = Get-SPWebApplication -includecentraladministration | where {$_.IsAdministrationWebApplication} Install-SPSolution –Identity $solName –GACDeployment -AllWebApplications -Force WaitForJob $solName #Waits for the deployment to complete Install-SPSolution –Identity $solName –GACDeployment -WebApplication $centralAdmin -Force
    – lgaud
    Jul 15, 2013 at 14:04
  • Do you have any special requirement to install the solution to the central admin i.e. in case of layouts pages etc? Otherwise, you should always deploy your solutions to SharePoint web applications not central admin. I have updated the solution deployment script that deploys WSPs from a certain folder and install/upgrade them accordingly. Jul 15, 2013 at 14:45
  • The solution that has features that are not showing up in Web Application Features unless I explicitly install them to Central Admin on my farm shouldn't need to be installed to Central Admin
    – lgaud
    Jul 15, 2013 at 14:59

4 Answers 4

1

Are you sure those features are not set to hidden? Can you perform a new deploy after explicitly specifying Hidden = "FALSE" (hidden attribute equals FALSE by default) in feature manifest?

Script usage: Specify the path of your WSPs in the script like C:\wsp_files_location and script will upgrade/install them.

$webapplurl = "http://youwebapplication.url.local/"

function WaitForInsallation([string] $Name)
{
        Write-Host -NoNewline "Waiting for deployment job to complete" $Name "."
        $wspSol = get-SpSolution $Name
        while($wspSol.JobExists)
        {
            sleep 2
            Write-Host -NoNewline "."
            $wspSol = get-SpSolution $Name
        }
        Write-Host "job ended" -ForegroundColor green
}

Function Deploy-SPSolution ($WspFolderPath)
{
    $wspFiles = get-childitem $WspFolderPath | where {$_.Name -like "*.wsp"}

    ForEach($file in $wspFiles)
    {
        $wsp = Get-SPSolution | Where{$_.Name -eq $file.Name}
        if($wsp -eq $null)
        {
            write-host "Adding solution"
            Add-SPSolution -LiteralPath ($WspFolderPath + "\" + $file.Name)
        }
        else
        {
            write-host "Solution already exists"

            if($wsp.Deployed -eq $true)
            {
                write-host "solution is deployed already, updating the solution"
                Update-SPSolution -identity $wsp.SolutionId -LiteralPath ($WspFolderPath + "\" + $file.Name) -GACDeployment
            }
             else
            {
               write-host "Removing solution"
               Remove-SPSolution -identity $wsp.SolutionId -confirm:$false

                write-host "Adding solution"
               Add-SPSolution -LiteralPath ($WspFolderPath + "\" + $file.Name)
            }
            WaitForInsallation -Name $wsp.Name
        }

        $wsp = Get-SPSolution | Where {$_.Name -eq $file.Name}
        if($wsp -ne $null)
        {
            write-host "Installing solution"

            if ($wsp.ContainsWebApplicationResource)
            {

                if($webapplurl)
                {
                    write-host "Installing solution web application" $webapplurl
                    Install-SPSolution –Identity $wsp -GACDeployment -force -WebApplication $webapplurl

                }
                elseif (!$webapplurl)
                {
                    write-host "Installing solution to all the web applications"
                    $wsp | Install-SPSolution -AllWebApplications -Confirm:$false -GACDeployment -force

                }



            }
            else
            {   
                write-host "Installing solution Globally"
                Install-SPSolution -identity $wsp.SolutionId -GACDeployment -force -Confirm:$false
            }
        }
        WaitForInsallation -Name $wsp.Name

    }
    write-host "Done"
    IISRESET /NOFORCE
}
try
{
        Deploy-SPSolution "C:\wsp_files_location"
}
catch
{
    write-host $_.exception

}
2
  • The solution has 3 features; one of them was explicitly setting Hidden to false, the other two did not set hidden. All show as Hidden=False when accessed via Get-SPFeature.
    – lgaud
    Jul 15, 2013 at 12:47
  • have you deactivated and uninstall the feature, retracted and deleted and then install the solution again? Jul 15, 2013 at 15:44
1

While answering Web App Level Feature not showing in SharePoint 2013 I realized the same question had poped-up recently. I searched and found it (this one); I had read it quickly two weeks ago, and that did not ring a bell at that time. It did ring a bell with the other question raised one hour ago.
So the new one is actually a dup of this one, but here's the answer I've just made. I copy it here for easy reference:

Depending on where the Central Administration is hosted (Web Front End or App server, and depending on the target of WSP package (not talking of the scope of the feature; I'm talking about the "Deployment Server Type" setting of the solution), this may happen.

For example, the features contained in the package are only installed on the Web Front End if the "Deployment Server Type" is set to WebFrontEnd. If you browse the CA hosted on the App Server, it thus does not list features that are not physically installed on that server.

Options to solve this include:

  1. Host the CA on the Web Front End as well, and browse it there to activate the feature.
  2. Switch the WSP mode to ApplicationServer (can be done only if it contains only the Web app feature you're mentioning).
  3. Activate the Web app feature from PowerhShell, while logged on the Web Front End (and hope the feature event receiver is well-coded, i.e. does not assume the ER is loaded in a Web context!).
  4. Turn the application server to a WFE (by activating the "SharePoint Foundation Web Application" service on it), even if it's not participating in the load-balancing.
0

Did you happen to check the Feature.xml file ? The Feature.xml file must contain, the Receiver class and receiver assembly properties.Also make sure that feature (FeatureActivated and FeatureDeactivating)receivers are in place!!

0

Faced simile issue and below is my situation. Your might be the same.

I had 3 box in my farm one CA, and two WFE. When we browse CA we could not see one of our Web Application level feature but we see other Web Application feature.

In our case WSP which was deploying invisible feature was not deployed globally. You will only see feature which is part of Globally Deployed WSP.

Feature is there but its just not visible from CA. If you try to use below power shell command on one of the WFE you will see it.

Get-SPFeature | Where { $_.Scope -eq "WebApplication" }

Hope this will help

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.