Correctness
Expand Minimize

Correctness

Correctness rules check the code for syntax errors. This includes check for all required XML attributes, correct values and data types of attributes.

Index

Rule Description Type Severity
SPC010101: Fix loader errors Errors occured during load of the files. SharePointApplication CriticalError
SPC010102: Declare required attribute 'SolutionId' in Solution Required attribute 'SolutionId' must be declared in Solution. Solution CriticalError
SPC010103: Define a valid GUID for attribute 'SolutionId' in Solution The attribute 'SolutionId' in Solution must be a valid GUID. Otherwise the deployment or retraction of the solution may not work properly. Solution Error
SPC010104: Remove unused files from Solution package Files in the solution package which are not listed in manifest.xml or in a feature.xml should be removed from the package. Solution CriticalWarning
SPC010202: Declare element 'SafeControl' for each implemented WebControl For each non-abstract class which is derived from 'System.Web.UI.WebControls.WebControl' a SafeControl entry must be placed inside the manifest.xml. Assembly CriticalWarning
SPC010203: Deploy referenced Assembly with correct version, culture and public key token If an assembly references a different assembly then version, culture and public key token of the referenced assembly must be the same or use BindingRedirects. Assembly CriticalWarning
SPC010212: Do not set SPSite.CatchAccessDeniedException property Property SPSite.CatchAccessDeniedException is reserved for internal use. Use the SPSecurity.CatchAccessDeniedException property instead to specify whether SharePoint Foundation traps and handles "Access Denied" exceptions. Assembly CriticalWarning
SPC010213: Do not set SPSite.ReadLocked property Property SPSite.ReadLocked is reserved for internal and is not intended to be used directly from your code. Use the IsReadLocked property instead. Assembly CriticalWarning
SPC010214: Do not use SPWeb.Properties property SPWeb.Properties is a StringDictionary and doesn't support casing for keys/values (everything gets converted to lowercase). Instead use SPWeb.AllProperties. SPWeb.AllProperties is a Hashtable and supports additional types of data. Assembly CriticalWarning
SPC010221: Do not call deprecated members Depending on the target SharePoint version of the solution an assembly in this solution should not call deprecated methods or properties. Assembly CriticalWarning
SPC010223: Do not implement deprecated interfaces Depending on the target SharePoint version of the solution an assembly in this solution should not implement deprecated interfaces. Assembly CriticalWarning
SPC010224: Do not inherit from deprecated type Depending on the target SharePoint version of the solution an assembly in this solution should not inherit from deprecated type. Assembly CriticalWarning
SPC010225: Do not reference deprecated types Depending on the target SharePoint version of the solution an assembly in this solution should not reference deprecated types. Assembly CriticalWarning
SPC010301: Remove empty Resource files If Resource files (.resx) are empty they could be removed. RootFile Warning
SPC010302: Avoid duplicate keys in Resource file Using duplicate keys in a Resource file (.resx) could lead to unexpected results. RootFile CriticalWarning
SPC010701: Declare required attributes in SiteDefinition Required attributes Title and ListDir must be declared in SiteDefinition. Project Error
SPC010702: Declare element 'SiteDefinition' in Solution A deployed SiteDefinition should be included correctly in manifest.xml of the Solution. SiteDefinition CriticalWarning
SPC010703: Do not reference WebApplication Feature in attribute 'VisibilityFeatureDependency' The attribute 'VisibilityFeatureDependency' is not supported for Features with Web application scope. Configuration Error
SPC012101: Declare required attributes in Feature Required attributes Id and Scope must be declared in Feature. Feature CriticalError
SPC012102: Define a valid GUID for attribute 'Id' in Feature The attribute 'Id' in Feature must be a valid GUID. Feature CriticalError
SPC012103: Remove spaces from Feature folder SharePoint Foundation supports no spaces for Feature folder and file names. Feature Error
SPC012104: Define attribute 'Title' in Feature with max. 255 characters The attribute 'Title' of a Feature is limited to 255 characters. Feature Error
SPC012111: Do not define attribute 'ActiveOnDefault' in Feature with Scope 'Web' or 'Site' Attribute 'ActivateOnDefault' cannot be 'TRUE' for Feature with Scope 'Web' or 'Site', except in Sandboxed solutions. In Sandboxed solutions the attribute is used during activation of the solution to activate Feature with scope 'Site'. This behavior is not documented in MSDN and may be unexpected und unintended. Feature Error
SPC012112: Do not define attribute 'AutoActivateInCentralAdmin' in Feature with Scope 'Farm' AutoActivateInCentralAdmin cannot be TRUE for Feature with Scope 'Farm'. Feature Error
SPC012113: Define required attributes for Feature receiver Attributes 'ReceiverAssembly' and 'ReceiverClass' must be defined in conjunction. Feature CriticalError
SPC012114: Define correct SolutionId in Feature All features in a solution must correctly reference their parent solution via the SolutionId property. Feature Error
SPC012115: Define ReceiverAssembly in Feature correctly ReceiverAssembly in Feature should contain the full qualified name of the referenced assembly. Feature Error
SPC012116: Define Version in Feature correctly Version in Feature should contain a correct version number. Feature Error
SPC012121: Add missing assembly for 'ReceiverAssembly' in Feature If a Feature references an assembly in attribute 'ReceiverAssembly' the assembly should be available. Feature Error
SPC012122: Deploy the 'ReceiverAssembly' of a Feature to GAC If a Feature references an assembly in attribute 'ReceiverAssembly' the assembly must be deployed to GAC. Otherwise the assembly could not be loaded during feature activation. Feature Error
SPC012131: Declare attribute 'Title' in Feature A Feature should have a Title. Feature Error
SPC012133: Do not define Feature Id with curly brackets A Feature Id should not contain curly brackets at the beginning and end. Feature Error
SPC012141: Add Resources when DefaultResourceFile is declared If attribute 'DefaultResourceFile' is declared the necessary Resource files must be available. Feature CriticalWarning
SPC012201: Declare required fields in FieldType Required fields Filterable, ParentType, Sortable, TypeDisplayName and TypeName must be declared in FieldType FieldType Error
SPC012202: Do not declare field 'InternalType' in FieldTypes Do not use a <Field Name="InternalType"> element in a custom field type definition. FieldType Error
SPC012203: Do not declare field 'SQLType' in FieldTypes Do not use a <Field Name="SQLType"> element in a custom field type definition. The field represents the SQL data type that will be used to store the data in the content database, but cannot be used in custom field types. FieldType Error
SPC012206: Declare field 'FieldTypeClass' in FieldType Field <Field Name="FieldTypeClass" /> is an optional element, but required for all custom field types. Represents the strong name of the field type class library. FieldType CriticalError
SPC012211: Do not use obsolete RenderPattern in FieldTypes RenderPattern in FieldTypes is obsolete. FieldType CriticalWarning
SPC012212: Do not use PropertySchema in FieldTypes PropertySchema in FieldTypes is obsolete. FieldType CriticalWarning
SPC015101: Do not define Field in Feature with scope 'WebApplication' or 'Farm' Field can only be deployed with Features of scope 'Web' or 'Site'. Field Error
SPC015102: Add curly brackets to Field ID Field ID must contain curly brackets. Field Error
SPC015103: Define a unique Field ID The ID of a Field must be unique in the farm. Field CriticalError
SPC015104: Define Field ID as valid GUID Field ID must be a valid GUID. Field CriticalError
SPC015105: Declare required attributes in Field Required attributes ID, Name and Type must be declared in Field. Field CriticalWarning
SPC015106: Define Field DisplayName with max. 255 characters The DisplayName of a Field is limited to 255 characters. Field Error
SPC015107: Do not use deprecated attribute 'FromBaseType' Attribute 'FromBaseType' is deprecated in favor of the Sealed attribute. Field CriticalWarning
SPC015108: Declare all recommended attributes in Field All recommended attributes ID, Type, Name, DisplayName, and Group should be declared in Field. Field CriticalWarning
SPC015109: Do not define lower case attribute 'Id' in Field The Field ID must be define in upper case attribute 'ID', not in the lower case attribute 'Id'. Field Error
SPC015111: Declare attribute 'Mult' for Type 'LookupMulti' and 'UserMulti' If attribute 'Type' of a field is 'LookupMulti' or 'UserMulti' the attribute 'Mult' must be set to TRUE. Field Error
SPC015112: Define a unique Field Name The Name of a Field should be unique in the farm. Field Error
SPC015113: Define a unique Field StaticName The StaticName of a Field should be unique in the farm. Field Error
SPC015201: Do not define ContentType ID longer than 1024 characters Content type IDs have a maximum length of 512 bytes. Because two hexadecimal characters can fit in each byte, each content type ID has an effective maximum length of 1024 characters. ContentType Error
SPC015202: Do not define ContentType in Feature with scope 'WebApplication' or 'Farm' ContentType can only be deployed with Features of scope 'Web' or 'Site'. ContentType Error
SPC015203: Declare required attributes in ContentType Required attributes ID and Name must be declared in ContentType. ContentType CriticalError
SPC015204: Do not define duplicate ContentType ID ContentType ID must be unique. ContentType Error
SPC015205: Do not define ContentType Name longer than 124 characters Length of attribute 'Name' in content types is limited to 124 characters. The name itself cannot be longer than 128 characters and cannot contain the characters \ / : * ? " # % < > { } | ~ &, two consecutive periods (..), or special characters such as a tab. ContentType Error
SPC015206: Define ContentTypes ID as hexadecimal GUID It is recommended to use the GUID approach to identify any content types that are direct children of content types you did not create. Use the GUID approach if the parent content type is one of the following. That way, you are assured that the content type ID is unique and will not be duplicated later by the developer of the parent content type. ContentType Warning
SPC015207: Do not declare attributes in ContentType which are reserved for internal use The attribute 'BaseType' is reserved for internal use and should not be declared in ContentType. ContentType Error
SPC015208: Do not declare obsolete attributes in ContentType The attributes 'ResourceFolder' and 'DocumentTemplate' are obsolete and should not be declared in ContentType. ContentType CriticalWarning
SPC015209: Inherit ContentType from existing parent ContentType The parent ContentType of a ContentType must be either a SharePoint ContentType or a ContentType within the WSP solutions. ContentType Error
SPC015210: Define correct parent FeatureId in ContentType If ContentType defines attribute 'FeatureId' the value must be correct and include braces. ContentType CriticalWarning
SPC015211: Define attribute 'Inherits' to FALSE in ContentType if RemoveFieldRef are used A content type should not have attribute 'Inherits' set to 'TRUE' if elements of type 'RemoveFieldRef' are used. Set Inherits to 'FALSE' or hide the not used columns with Hidden=TRUE to remove fields from a content type. ContentType CriticalWarning
SPC015212: Define attribute 'Inherits' to FALSE in ContentType if Custom Forms are used A content type should not have attribute 'Inherits' set to 'TRUE' if custom forms are used. Set Inherits to 'FALSE' or remove the custom form from a content type. ContentType CriticalWarning
SPC015213: Avoid XML comments inside a ContentType definition Comments inside the ContentType definition (XML) can break loading them. ContentType CriticalWarning
SPC015301: Do not define Module in Feature with scope 'WebApplication' or 'Farm' Module can only be deployed with Features of scope 'Web' or 'Site'. Module Error
SPC015302: Add missing referenced File for Module A Module in a Feature deploys files which are included in the feature as ElementFile. The rule checks if this referenced file is available or not. Module CriticalError
SPC015303: Declare File element in Module A Module should contain at least one File element as child. Otherwise the Module has no need and should be removed. Module CriticalWarning
SPC015401: Do not define ListInstance in Feature with scope 'WebApplication' or 'Farm' ListInstance can only be deployed with Features of scope 'Web' or 'Site'. ListInstance Error
SPC015402: Declare required attributes in ListInstance Required attributes TemplateType, Title and Url be declared in ListInstance. ListInstance CriticalError
SPC015403: Define unique value for attribute 'Id' in ListInstance If a value is defined for attribute 'Id' is defined in a ListInstance the value must be unique within the same Feature. ListInstance CriticalError
SPC015404: Deploy missing ListTemplate for ListInstance A ListInstance instantiates lists based on a ListTemplate. This ListTemplate must be either a SharePoint default ListTemplate or a custom ListTemplate which must be deployed. ListInstance CriticalError
SPC015405: Remove curly brackets from attribute FeatureId in ListInstance Curly brackets should be removed from attribute 'FeatureId' in ListInstance. ListInstance Warning
SPC015406: Deploy missing ListDefinition in CustomSchema of ListInstance A ListInstance can directly reference a ListDefinition in attribute 'CustomSchema'. This ListDefinition must be depoyed in the same Feature as ElementFile. ListInstance CriticalError
SPC015501: Do not define ListTemplate in Feature with scope 'WebApplication' or 'Farm' ListTemplate can only be deployed with Features of scope 'Web' or 'Site'. ListTemplate Error
SPC015502: Declare required attributes in ListTemplate Required attributes BaseType, DisplayName and Name must be declared in ListTemplate. ListTemplate CriticalError
SPC015505: Do not define ListTemplate Name with spaces Name of ListTemplate cannot contain spaces or special characters. ListTemplate Error
SPC015506: Define unique attribute 'Type' for ListTemplate The attribute 'Type' must be unique within the Feature. ListTemplate CriticalError
SPC015510: Deploy missing Image in ListTemplate If a ListTemplate references a file in attribute 'Image' (e.g. an icon) the file must be deployed. ListTemplate Error
SPC015511: Do not deploy Taxonomy fields using ListTemplate. Taxonomy fields should be deployed by content types, not inside ListTemplates. ListTemplate CriticalError
SPC015601: Do not define ContentTypeBinding in Feature with scope 'WebApplication' or 'Farm' ContentTypeBinding can only be deployed with Features of scope 'Web' or 'Site'. ContentTypeBinding Error
SPC015701: Declare required attribute in CustomAction Required attribute 'Title' must be declared in CustomAction. CustomAction CriticalWarning
SPC015702: Define unique value for 'Id' in CustomAction Define a unique value for attribute 'Id' in CustomAction. The ID may be a GUID, or it may be a unique term. CustomAction CriticalError
SPC015703: Deploy missing file in UrlAction for CustomAction If a CustomAction references a file in attribute 'UrlAction' (e.g. ASPX page) the file must be deployed. Otherwise a click on this CustomAction will lead to 404 error. CustomAction Error
SPC015704: Deploy missing file in ImageUrl for CustomAction If a CustomAction references a file in attribute 'ImageUrl' (e.g. an icon) the file must be deployed. CustomAction Error
SPC015705: Deploy missing file in Ribbon for CustomAction If a CustomAction references a file in ribbon (e.g. an icon) the file must be deployed. CustomAction Error
SPC015706: Deploy missing file in CommandUIHandler for CustomAction If a CustomAction references a file in ribbon CommandUIHandler (e.g. a page) the file must be deployed. CustomAction Error
SPC015801: Declare required attributes in CustomActionGroup Required attributes 'Location' and 'Title' must be declared in CustomActionGroup. CustomActionGroup Error
SPC016001: Do not define Receiver in Feature with scope 'WebApplication' or 'Farm' Receiver can only be deployed with Features of scope 'Web' or 'Site'. Receiver Error
SPC016002: Declare Scope for Receivers in Site Features If event receivers are used within a feature with scope 'Site' the attribute 'Scope' should be specified. Receivers CriticalWarning
SPC016003: Do not define Receiver 'EmailReceived' on SiteCollection level. If email event receivers are used within a feature with scope 'Site' the attribute 'Scope' must be set to 'Web' or the event receiver must be deployed via a web scopes feature. Receivers Error
SPC016101: Define ControlAssembly and ControlClass in DelegateControl When implementing a server control (DelegateControl), use both the ControlAssembly and ControlClass attributes. DelegateControl CriticalError
SPC016102: Deploy missing assembly from attribute ControlAssembly When using attribute ControlAssembly the referenced assembly must be deployed to SharePoint or must be a SharePoint assembly. DelegateControl CriticalError
SPC016103: Deploy missing control from attribute ControlSrc When using attribute ControlSrc the referenced ascx control must be deployed to SharePoint or must be a SharePoint control. DelegateControl CriticalError
SPC016201: Do not define Worfklow in Feature with scope 'Web', 'WebApplication' or 'Farm' Worfklow can only be deployed with Features of scope 'Site'. Workflow Error
SPC016202: Declare required attributes in Workflow Required attributes Name, CodeBesideAssembly, CodeBesideClass and Id must be declared in Workflow. Workflow Error
SPC016203: Define a valid GUID for attribute 'Id' in Workflow The attribute 'Id' in Workflow must be a valid GUID. Workflow CriticalError
SPC016301: Do not define DocumentConveter in Feature with scope 'Web', 'Site' or 'Farm' DocumentConveter can only be deployed with Features of scope 'WebApplication'. DocumentConverter Error
SPC016401: Declare property 'Title' in WebParts WebPart should contain a title which is visible to the user in SharePoint. WebPart Error
SPC016501: Declare required attributes in FieldRef Required attributes ID, Name must be declared in FieldRef. FieldRef CriticalError
SPC016502: Define attribute 'ID' with curly brackets in FieldRef The attribute 'ID' in elements of type 'FieldRef' should start and end with '}'. Otherwise they may not work correctly. FieldRef Error
SPC016503: Define attribute 'ID' in FieldRef in correct casing The attribute 'ID' in elements of type 'FieldRef' is case sensitive. It must use the same casing as the ID of the referenced field. FieldRef Error
SPC016601: Declare required attributes in RemoveFieldRef Required attributes ID must be declared in RemoveFieldRef. RemoveFieldRef CriticalError
SPC016602: Do not declare ignored attributes in RemoveFieldRef Do not declare attributes except ID in RemoveFieldRef. All other attributes are ignored by SharePoint. RemoveFieldRef CriticalWarning
SPC016603: Define attribute 'ID' with curly brackets in RemoveFieldRef The attribute 'ID' in elements of type 'RemoveFieldRef' should start and end with '}'. Otherwise they may not work correctly. RemoveFieldRef Error
SPC017001: Do not define TemplateAssociation in Feature with scope 'Web' TemplateAssociation (FeatureSiteTemplateAssociationDefinition) can only be deployed with Features of scope 'Site', 'WebApplication' or 'Farm'. TemplateAccociation Error
SPC017002: Declare required attributes in TemplateAssocation Required attributes Id and TemplateName must be declared in TemplateAssocation. TemplateAccociation CriticalError
SPC017101: Do not define PropertyBag in Feature with scope 'WebApplication' or 'Farm' PropertyBag can only be deployed with Features of scope 'Web' or 'Site'. PropertyBag Error
SPC017401: Declare required attributes in FeatureActivationDependency Required attribute FeatureId must be declared in FeatureActivationDependency. FeatureActivationDependency CriticalError
SPC017402: Define optional attributes in FeatureActivationDependency correctly If optional attributes in FeatureActivationDependency are defined (like the target 'FeatureTitle') the values must be the same. FeatureActivationDependency CriticalWarning
SPC017411: Do not add ActivationDependency to hidden Feature Features with ActivationDependency cannot be hidden. FeatureActivationDependency CriticalError
SPC017412: Do not add ActivationDependency to a Feature with a more restrictive scope A Feature cannot have an ActivationDependency to a more restrictive scope. For example, a site collection-scoped Feature cannot have an ActivationDependency on a Web site-scoped Feature. FeatureActivationDependency CriticalError
SPC017413: Do not add cross-scope ActivationDependency to a hidden Feature A Feature cannot have an cross-scope ActivationDependency to a hidden Feature. For example, a Web site-scoped feature cannot be dependent on a site collection–scoped Feature that is not visible in the user interface. FeatureActivationDependency CriticalError
SPC017414: Do not chain ActivationDependencies of Features when last Feature is visible ActivationDependencies can work only one level deep. SharePoint Foundation does not support more than one level in activation dependencies if the last Feature is visible. FeatureActivationDependency CriticalError
SPC017415: Do not create circular chain of FeatureActivationDependencies ActivationDependencies between Features can result in a circular dependency which is not allowed. FeatureActivationDependency CriticalError
SPC017510: Declare element 'DefaultDescription' in schema of ListTemplate The element 'DefaultDescription' must be declared in the schema.xml of a ListTemplate. List CriticalWarning
SPC017511: Declare required attributes in schema of ListTemplate The attribute 'Title', 'Name' and 'Direction' must be declared in the schema.xml of a ListTemplate. List CriticalWarning
SPC017601: Deploy missing assembly for WebService (.svc) A WCF Webservice (.svc) file references an assembly which handles the requests for the WebService. This assembly should be present in the solution. TemplateFile Error
SPC017701: Declare required attributes in WebTemplate Required attributes BaseTemplateID, BaseTemplateName, BaseConfigurationID and Name must be declared in WebTemplate. WebTemplates CriticalError
SPC017702: Derive WebTemplate from an existing Template A WebTemplate must derive from an existing Template, e.g from a template in TEMPLATE\1033\XML\WEBTEMP.xml. WebTemplates Error
SPC017711: Declare recommended attributes in WebTemplate Attributes Title and Description should be declared in WebTemplate. WebTemplates Error
SPC019901: Do not declare obsolete attributes Obsolete attributes should not be declared and should be removed from the code. ObsoleteProperty CriticalWarning
SPC019902: Define Boolean attributes in upper case Boolean attributes should be define in upper case letters (TRUE or FALSE). BooleanProperty CriticalWarning
SPC019903: Remove spaces from resource keys If attributes in SharePoint elements are localized with resources the resource key cannot contains spaces. LocalizableProperty CriticalWarning
SPC019904: Add translation for a resource key If attributes in SharePoint elements are localized with resources the resource key must be available in a resx file. LocalizableProperty 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.