SPC012111: Do not define attribute 'ActiveOnDefault' in Feature with Scope 'Web' or 'Site' |
SPC012111: Do not define attribute 'ActiveOnDefault' in Feature with Scope 'Web' or 'Site' |
Attribute 'ActivateOnDefault' cannot be 'TRUE' for Feature with Scope 'Web' or 'Site', except in Sandboxed solutions. In Sandboxed solutions the attribute is used during activation of the solution to activate Feature with scope 'Site'. This behaviour is not documented in MSDN and may be unexpected und unintended.
TypeName: | DoNotDefineActiveOnDefaultInWebOrSiteFeatures |
CheckId: | SPC012111 |
Severity: | Error |
Type: | Feature |
Completely remove attribute 'ActivateOnDefault' from a Feature with Scope 'Web' or 'Site'.
There is different behaviour of the attribute 'ActiveOnDefault' between farm solutions and sandboxed solutions. But SPCAF cannot differentiate between a farm solution and a sandboxed solution because both types look the same. Therefore the rule detects a error violation if the attribute is used to warn the developer of this potenially unexpected behaviour.
comments powered by Disqus
Copyright © 2013 RENCORE AB. All Rights Reserved
Disclaimer: The views and opinions expressed in this documentation and in SPCAF are those of the creators and do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. All trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners. SharePoint Code Analysis Framework, Version 4.5.2.7855, see www.spcaf.com for more information |