Luis
Luis

Reputation: 6001

Activate Sharepoint Feature when Solution is deployed

I want to automatically activate a feature (specifically the SharePoint Server Publishing feature) automatically when I deploy a new wsp solution. Is this possible.

Where and How do I do this inside the visual studio Sharepoint project?

Upvotes: 0

Views: 7551

Answers (2)

Guy Cox
Guy Cox

Reputation: 1

Look at the properties on the feature within VS -- there are a couple of options there that will control how the features behave when the solution is deployed via VS ( only ).. these settings have no affect on the solution once it is out of VS...

  1. Activate On Default - Indicates whether the feature is activated during installation
  2. Always force Install - Indicates whether the feature is installed by force, even though it is already installed.
  3. Auto Activate in Central Admin - Indicates that the feature is activated for administrators in CA...

Upvotes: 0

V_B
V_B

Reputation: 1569

Hi Luis Please check this solution how to activate feature programmatically

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/9812889d-954a-43ef-9377-6561e91f3bbf/

Upvotes: 2

Related Questions