Expand Minimize

SMA260401: Deploy TemplateFile as Module

TemplateFile is a file referenced in the package manifest manifest.xml. A module will allow for controlled deployment through features, without a module, the WSP will be blocked from deployment.

CheckId SMA260401
TypeName LayoutFilesRecommendations
Severity CriticalWarning
Type TemplateFile

Full Trust Approach App Approach
Template File

TemplateFile is a file referenced in the package manifest manifest.xml. These are files to be deployed to the SharePoint Environment. Ideally these files should be deployed using a Module which will allow for controlled deployment through features. The module tells SharePoint how and where to store the files.

Module deployment through the App Model

The App Model in this instance is built for remote provisioning of files and resources. You can upload files using CSOM to any existing library that you have access too. The App Model describes file locations through code, as opposed to the module which describes file locations declaratively through XML.

Impact of Full Trust Approach Benefit of App Approach
Code Based Retraction

In order to retract a module solution from a SharePoint farm, we need at least SandBox code to be available. This breaks away from the no Farm solution deployment model of the App Remote Provisioning Model, which increases Disaster Recovery Risk and reduces migratability.

Increased Disaster Recovery Reliability

If anything does go wrong on the SharePoint farm, the remote event receivers can be made to wait to reconnect, instead of the alternative, having them run locally, and losing the data which was being processed. This means that the chance of lost data is substantially reduced when using many Event Receivers in your Farm. The other benefit of having no deployed files to the server means that you are only backing up the content database, ensuring a faster and more accurate disaster recovery process overall.

Efforts and Benefits

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

Effort Drivers

  • Increases Disaster Recovery Speed
  • Reducing Future Work in Migration Plans

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.