When creating SharePoint features in Visual Studio 2010, one of the settings that defaults to True is “Activate on Default”.
There is a lot of confusion as to what this setting actually does:
- It ONLY applies to features scoped at Farm and Web Application levels. You can still modify it for other features, but it doesn’t do anything.
- Any feature (Farm or WebApplication) with that setting set to True will automatically activate when you deploy the WSP solution, no matter which way you deploy it (Install-SPSolution, stsasm.exe, Central Administration)
This setting is not related to the deployment configuration settings in Visual Studio 2010:
These features will still activate, even if VS’s deployment configuration is set to “No Activation”.
Where can this be an inconvenience?
When you create features that deploy Timer Jobs at the Web Application level, you really want to have “Activate on Default” set to False. Otherwise, your feature will be activated on ALL web applications. I did some tests and found out that even if your WSP Solution is not global and is deployed to a specific Web Application, your feature will still get activated. Dangerous, you really want your Timer Jobs to be running where they are meant to run, i.e. don’t deploy Timer Jobs to Central Administration unless you really need to.
If you are ever trying to find out why your Timer Jobs are “attached” to all web applications, this might be why.