5

Does anyone here know what could cause a new feature to not show up in the SharePoint UI? The solution it is part of has been correctly deployed to the GAC and shows up in the central administration list of deployed farm solutions, the feature appears in the FEATURES folder of the 14 hive, yet the feature itself does not appear in the features list for the site collection, either in the UI or in PowerShell using Get-SPFeature.

Yes, the feature is correctly scoped (at sitecol level), and no, it is not hidden. :) It doesn't appear at webapp, farm or site level either.

Any thoughts or pointers would be very welcome!

1
  • Can you provide the XML of the feature definition? Jul 30, 2013 at 18:23

3 Answers 3

10

Check that the feature has been installed. For example, if you are performing Update-SPSolution and a new feature has been added between solution deployments then the feature is not installed by default.

To check do the following:-

  • Run SharePoint 2010 Management Shell from one of the SharePoint servers
  • Type Install-SPFeature -ScanForFeatures
  • This will show you any features that are available in the SharePoint Root but have not been installed.

You can install any missing features using the command :-

  • Install-SPFeature -AllExistingFeatures

See the following TechNet Article for more information.

http://technet.microsoft.com/en-us/library/ff607825(v=office.14).aspx

5
  • Thanks Simon, that appears to have done the trick! Install-SPFeature -ScanForFeatures displays the feature I've been looking for, but then when I ran Install-SPFeature -AllExistingFeatures, 15 features were installed at various levels. I would've thought the first command would have displayed all of these?
    – Vassal
    Jul 31, 2013 at 11:22
  • Additionally, this feature is part of a solution that needs to be redeployed regularly using custom scripts - at what point is a feature installed? I had done an uninstall/remove/add/install on the solution, but for some reason the feature had not installed properly. This is not an issue I've encountered before, but since this deployment process is going to be run repeatedly in the future, it'd be good to know what's gone wrong / what was missed. Many thanks for your help.
    – Vassal
    Jul 31, 2013 at 11:42
  • Agreed would have thought others would have shown up. Maybe the Scan for Features only runs at one scope level and AllExistingFeatures runs throughout. For deployment i suggest using Update-SPSolution. You will need to detail new features that need to be installed but I have a lot of success with this approach over the years.
    – Simon Doy
    Jul 31, 2013 at 20:42
  • Just a quick note for anyone who has encountered the same problem - I've found that the feature can be installed during solution deployment by adding a -Force parameter to the Install-SPSolution command.
    – Vassal
    Aug 13, 2013 at 10:43
  • Just be a little careful with the -Force parameter as it will stop errors from being shown if there are problems. However as long as you have a through check process after deployment to ensure that all servers have had the solution deployed successfully you should be ok.
    – Simon Doy
    Aug 15, 2013 at 15:02
1

This guy seems to have had the same issue as you.

Try doing as the marked answer suggests and see if it helps.

First deactivate the feature. Use the Name of the feature and not the .wsp name.

stsadm -o deactivatefeature -name "FeatureName" -url http://mywebapp.com

Retract the solution from the farm

stsadm -o retractsolution -name solution.wsp -allcontenturls -immediate

Run the execute server jobs command

stsadm -o execadmsvcjobs

Delete the solution from the solution store

stsadm -o deletesolution -name solution.wsp

This should give us a clean start. Now we can put the solution back.

stsadm -o addsolution -filename solution.wsp

Deploy the solution. Use the -allowgacdeployment switch if the solution needs to go to the GAC (Global Assembly Cache). Otherwise, leave it out.

stsadm -o deploysolution -name solution.wsp -url http://mywebapp.com/ -immediate -allowgacdeployment

Run the execute server jobs command

stsadm -o execadmsvcjobs

Install the feature to the farm

stsadm -o installfeature -name "FeatureName" -force

Activate the Feature

stsadm -o  activatefeature -name "FeatureName" -url http://mywebapp.com
1
  • Does anyone know how to perform these commands using powershell? Specifically the "installfeature" operation, since Install-SPFeature doesn't have the -name paramter. Sep 6, 2016 at 18:34
1

Check solution's deployment type. If it's set to ApplicationServer, the features won't be installed automatically. You need to have it set to WebFrontEnd if you want to avoid doing Install-SPFeature after deploying your solution.

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.