How do you activate a feature on promotion?
-
06-12-2019 - |
Question
When promoting a wsp and you have 1 or more features you wish to activate as soon as promoted, how do you do so without manually activating them on the site they are deployed to?
Solution
The feature manifest has an attribute 'ActivateOnDefault' which will trigger an activation during installation (WSP upgrade qualifies). Note that this doesn't apply to site or web scoped features. However, if you want to activate a site/web feature by default then you can do things like create a farm feature as a 'controller' which will activate these for you. http://msdn.microsoft.com/en-us/library/ms436075.aspx
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange