Expand Minimize

SMA265501: Avoid deployment of List Definition via Feature Framework

Deploying List Definitions through 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 SMA265501
TypeName ListDefinitionRecommendations
Severity CriticalWarning
Type ListTemplate

Full Trust Approach App Approach
List Definition

A List definition is the Schema for a SharePoint List. A List definition contains Schema.xml which contains the information relating to the columns, content types, views, and forms.

Paradigm Shift - Deployment through Code

The alternate method is to deploy the List through code. This methodology takes the structure of a List and each component of the List, then creates these elements through Managed Code. 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
Dependency on Deployed Files

When you create an element in SharePoint from a Declarative file, the content you have created is then dependent on the XML files they are described in. When these need to be retracted, due to an update, a change in the system, or part of a disaster recovery plan, this link is broken. This will ultimately cause issues in the long run.

Cloud Application Model

The Cloud Application Model or CAM, is designed to create content through code, therefore not creating any sort of dependency links.

Efforts and Benefits

Migration Impact High
Re-Design Effort Medium
Re-Development Effort High
Long Term Benefit Critical

Effort Drivers

  • No hard links between the provisioning procedure, and the content
  • Easily Migratable, and Future Proofed

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":"SMA265501:ListDefinitionRecommendations","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.