1

I am building a SharePoint 2010 solution in Visual Studio 2012. When I deploy the solution, the features are automatically being activated. How do I disable this? Other answers have mentioned the "ActivateOnDefault" option, but I do not see this anywhere.

  • 1
    If you are F5 deploying in your dev environment, then don't do that. Simply package the wsp and do the standard PowerShell deployment. – Eric Alexander Dec 10 '15 at 13:49
  • Are you working on a Web application scope feature? – Evariste Dec 10 '15 at 13:50
  • Actually, Eric, I am using Build|Deploy Solution. It works perfectly fine, and I don't have to use PowerShell. – CigarDoug Dec 10 '15 at 14:21
3

Web application scoped features are automatically activated at WSP deployment.
This is controlled by the ActivateOnDefault property you can find in the property window of the feature in VS. See https://msdn.microsoft.com/en-us/library/ms436075.aspx and the ActivateOnDefault attribute.

  • Please tell me exactly where to find this property. When I click F4, I see "Build Action", "Copy to Output Directory", "Custom Tool", "Custom Tool Namespace" I don't see "ActivateOnDefault". – CigarDoug Dec 10 '15 at 14:04
  • Double-click the feature in the Solution Explorer view, and the properties window should switch to a more detailed view including the Activate On Default property. – Evariste Dec 10 '15 at 14:05
  • Oh, I see it now. It's the properties pane, WHEN the properties panel is open. I thought I was losing my mind. – CigarDoug Dec 10 '15 at 14:16

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.