1

I have a package with several features all scoped at the web level. I would like to have all of these features activated once the solution is deployed. I see feature receivers, but don't see an equivalent package receiver, so i don't know where i could hook in some logic or how.

I also found the pre/post deployment command found in the SharePoint tab of the solution properties, but my understanding is that this is only used when deploying from visual studio.

Is this something that is achievable?

1

During development you can set the deployment configuration to "default" of the feature in Visual Studio. In production you have to automate the installation yourself. This can be done using SharePoint Management Shell (PowerShell).

The process is documented on MSDN

  • We are going to use a powershell script to automate the activation of the features – user5389 Mar 25 '14 at 14:47
1

Package is nothing but a wrapper that installs all the features in it.. About feature activation, you may need features for the new site collection, for a new subsite and depending on their levels you may need to activate them.. Thus the choice is left on you..

For example, in our company we make custom Web Templates and on WebProvisioning we activate the features, apply masterpage, create lists, create pages etc. For this approach please have a look at below article:
SharePoint 2010 and web templates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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