Expand Minimize

SMA262101: Avoid deployment of Feature via Feature Framework

The Feature Framework creates dependencies on the provisioning XML files. Break this dependency to help future migrations, and updates by using the Remote Provisioning techniques from Microsoft.

CheckId SMA262101
TypeName FeatureRecommendations
Severity CriticalWarning
Type Feature

Full Trust Approach App Approach
Executing functionality on an ad-hoc basis

Features allow functionality to be encapsulated and only be used when requested. Features can be activated and deactivated as required, and are used to provision new components to a SharePoint Site. Common uses are:

  • Sub Site Creation
  • Creation of Lists/Libraries
  • Creation of content types
  • Other sub artifacts of the above

Paradigm Shift - Deployment through Code

An alternate method is the creation of content through code. This method takes the structure of a site and creates the Fields, Content Type, Lists, etc. programmatically in place of the features. While also popular in Full-Trust solutions, it is the preferred method through the App Model, doing the same provisioning process remotely.

Impact of Full Trust Approach Benefit of App Approach
Feature Dependency

Once activated, a feature or the solution that holds the feature cannot be easily removed once components are in place.

Difficult upgradeability, with possible downtime

This activation creates a dependency on the WSP installed as above. This means that if there has to be an update, it is possible that the entire site may have to be offline during this process in order to avoid corruption or error.

Feature Independence

Apps allow complete seperation, allowing a smaller percentage of downtime of a site. Instead of taking a whole site offline during an update, only the components being updated need be taken offline.

Efforts and Benefits

Migration Impact High
Re-Design Effort Medium/High
Re-Development Effort Low ~ High
Long Term Benefit High

Effort Drivers

  • Simpler upgrade paths
  • Reduced downtime
  • Seperation of feature dependency

To suppress this violation in XML SharePoint code add the following comment right before the XML tag which causes the rule violation. Learn more about SuppressMessage here.

<!-- "SuppressMessage":{"rule":"SMA262101:FeatureRecommendations","justification":"Provide reason for suppression here"} -->
Disclaimer: The views and opinions expressed in this documentation and in SPCAF do not necessarily reflect the opinions and recommendations of Microsoft or any member of Microsoft. SPCAF and RENCORE are registered trademarks of Rencore. All other trademarks, service marks, collective marks, copyrights, registered names, and marks used or cited by this documentation are the property of their respective owners.