SMA265601: Avoid deployment of ContentTypeBindingDefinition via Feature Framework |
Deploying ContentTypeBindingDefinition 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 | SMA265601 |
---|---|
TypeName | ContentTypeBindingRecommendations |
Severity | CriticalWarning |
Type | ContentTypeBinding |
Full Trust Approach | App Approach |
---|---|
Content Types
A content type is a shared definition of a list. It describes Fields and Views, which can be reused where they are deployed. Content Type BindingA Content Type Binding, is part of the Onet.xml. The Onet.xml file is a part of the Site Definition, providing a full description of all lists, libraries, features, and settings that are to be setup on a SharePoint site, when created. |
Paradigm Shift - Deployment through Code
An alternate method is the creation of Content Types through code, then using these Content Types to create lists. This method takes the structure of a List, and creates the Content Type programmatically. 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 a 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 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.