Deployment |
The deployment process of SharePoint customizations is often a critical part. Deploying the wrong way or the wrong files can harm the SharePoint farm or make the farm inaccessible. Deployment rules check the code for these risks or potential problems.
Index
Rule | Description | Type | Severity |
---|---|---|---|
SPC060101: Consider the deployment of solution per web application and not globally | Solution should not be deployed globally to reduce the impact of the solution for the SharePoint farm. Note: this guidance does not apply to SharePoint 2013 and further. | Solution | CriticalWarning |
SPC060103: Do not deploy prohibited assemblies | In some case WSPBuilder includes prohibited assemblies into the package, e.g. 'ssocli.dll'. | Solution | Error |
SPC060105: Do not deploy thumbs.db | In some case the file thumbs.db is generated in a Visual Studio project. This file should not be included in the WSP package. | Solution | CriticalWarning |
SPC060106: Do not reset webserver | A solution should not reset the webserver. | Solution | Warning |
SPC060107: Define mode 'Recycle' for Solution upgrade | To reduce the downtime of a SharePoint farm during deployment the solution should not use default setting 'StartStop' for upgrading solutions. Spedifying 'Recycle' only recycles affected application pools and will not stop them. | Solution | Warning |
SPC060108: Do not deploy files directly into system folder | Solutions should not write in folders of system files directly. If you need to deploy a file in a system folder, use a project specific subfolder. | Solution | CriticalWarning |
SPC060111: Do not deploy batch files (.bat) | Batch files should not be included in the WSP package. | Solution | CriticalWarning |
SPC060112: Do not deploy PowerShell scripts (.ps1) | PowerShell scripts should not be included in the WSP package. | Solution | CriticalWarning |
SPC060113: Do not deploy setups (.msi) | Setups like .msi files should not be included in the WSP package. | Solution | CriticalWarning |
SPC060201: Deploy Assembly which must run in full trust to GAC | The Assembly must be deployed to global assembly cache because it contains code which must be run in full trust or must be avaible to other components or services. | Assembly | Error |
SPC060202: Avoid deployment of Assembly to GAC if it is not necessary | Assemblies should only be deployed to global assembly cache (GAC) if they contain e.g. feature receivers, event receivers, timer jobs or workflows. Consider the deployment to WebApplication. | Assembly | Warning |
SPC060203: Do not deploy assembly with DEBUG mode | Assembly should be build with RELEASE mode. Main reason is to prevent running code which is defined within #DEBUG preprocessor directive and which typically should not run in productive environments. | Assembly | Error |
SPC060204: Do not deploy SharePoint assemblies | In some case Visual Studio or WSPBuilder include SharePoint assemblies into the package (e.g. Microsoft.Search.dll). This is not allowed. | Assembly | CriticalError |
SPC060205: Do not deploy assembly multiple times | In some case the same assembly is included in several WSP packages of the same solution. This can occur if Visual Studio or WSPBuilder includes the files automatically into the WSP package. | Assembly | Error |
SPC060206: Do not deploy empty Assemblies | Assemblies without custom classes should not be deployed to SharePoint. This helps to reduce unneeded IISResets during deployment. | Assembly | Warning |
SPC060209: Do not deploy SPWebConfigModifications via features | Deployment of SPWebConfigModifications with a feature receiver should be avoided. The activation of this feature will start a timer job and will initiate the restart of services which may lead to problems during a deployment. Consider deploying of SPWebConfigModifications via PowerShell script or supplemental config file. | Assembly | Warning |
SPC060303: Do not deploy RootFile to TEMPLATE folder | Deploy a RootFile not to the TEMPLATE folder. Deploy this file as TemplateFile in the solution. | RootFile | Error |
SPC060304: Do not deploy RootFile multiple times | Deploy a RootFile only once to SharePoint. Do not deploy the file by different solutions because this could lead to problems if one solution is retracted and removes the file. | RootFile | Error |
SPC060401: Do not deploy Images to LAYOUTS folder | Do not deploy Images to LAYOUTS folder. Deploy to IMAGES folder instead. | TemplateFile | Warning |
SPC060402: Deploy only Images to IMAGES folder | Deploy only Images to IMAGES folder. For files which are not images choose a different folder (e.g. LAYOUTS). | TemplateFile | Warning |
SPC060403: Deploy binary files (like Assemblies) to ClientBin folder | Binary files should be deployed to LAYOUTS/ClientBin folder. This helps to find these files at the correct location. | TemplateFile | Warning |
SPC060404: Do not deploy TemplateFile multiple times | Deploy a TemplateFile only once to SharePoint. Do not deploy the file by different solutions because this could lead to problems if one solution is retracted and removes the file. | TemplateFile | Error |
SPC060405: Do not deploy files of a Feature as TemplateFile | File which are deployed into the folder of a Feature should not be deployed as TemplateFile. Either deploy the files as ElementFiles in the Feature (preferred) or as Resources in manifest.xml. | TemplateFile | CriticalWarning |
SPC060501: Do not deploy Features ElementFiles as Resources | Resource files can be used to deploy resources to an existing Feature folder. If the target Feature is part of the same solution package binary files should be deployed as ElementFile in the Feature. If the target Feature is not part of the package it does make sense to use Resources (e.g. to deploy additional languages to existing features). | Resource | CriticalWarning |
SPC062101: Deploy missing image for Feature | If a custom icon for a Feature is defined in attribute 'ImageUrl' the file should be deployed to SharePoint if not a SharePoint default image is used. | Feature | CriticalWarning |
SPC062102: Deploy missing ElementManifest or ElementFile in Feature | If ElementManifests or ElementFile are listed in the feature.xml these files must be deployed within the solution package. | Feature | CriticalWarning |
SPC062103: Do not deploy feature with same folder name multiple times | In some case the same feature is included in different WSP packages. | Feature | CriticalError |
SPC062104: Do not deploy feature with same ID name multiple times | In some case the same feature is included in different WSP packages. | Feature | CriticalError |
SPC062111: Do not deploy empty ElementManifests in Features | ElementManifests files in Features which do not contain any element have no purpose and should be removed from the solution. | Feature | CriticalWarning |
SPC062112: Do not deploy SharePoint assemblies as ElementFile | In some case Visual Studio or WSPBuilder include SharePoint assemblies into the package (e.g. Microsoft.Search.dll). This is not allowed. | Feature | CriticalError |
SPC067201: Do not deploy Webservice (.asmx) to LAYOUTS folder | A Webservice (.asmx) should not be deployed to '\TEMPLATE\LAYOUTS\' folder (url: '../_layouts/..'). It should be deployed to '\ISAPI\' instead (url '../vti_bin/..'). | TemplateFile | Error |
SPC067202: Do not deploy Administration Webservice (.asmx) to ADMIN folder | A Administration Webservice (.asmx) should not be deployed to '\TEMPLATE\ADMIN\' folder (url: '../_admin/..'). It should be deployed to '\ADMISAPI\' instead (url '../vti_adm/..'). | TemplateFile | Error |
SPC067601: Do not deploy a WCF Webservice (.svc) to LAYOUTS folder | A WCF Webservice (.svc) should not be deployed to '\TEMPLATE\LAYOUTS\' folder (url: '../_layouts/..'). It should be deployed to '\ISAPI\' instead (url '../vti_bin/..'). | TemplateFile | Error |
SPC067602: Do not deploy a WCF Administration Webservice (.svc) to ADMIN folder | A WCF Administration Webservice (.svc) should not be deployed to '\TEMPLATE\ADMIN\' folder (url: '../_admin/..'). It should be deployed to '\ADMISAPI\' instead (url '../vti_adm/..'). | TemplateFile | Error |
SPC067701: Deploy missing image for WebTemplate | If a custom icon for a WebTemplate is defined in attribute 'ImageUrl' the file should be deployed to SharePoint if not a SharePoint default image is used. | WebTemplates | CriticalWarning |
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.