Correctness

Correctness

Correctness rules check the SharePoint XML 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 schema errors The XML files within a wsp solution should not contain schema errors. 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. AssemblyFileReference 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. SiteDefinitionManifestFileReference 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 behaviour 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'. FieldDefinition Error
SPC015102: Add curly brackets to Field ID Field ID must contain curly brackets. FieldDefinition Error
SPC015103: Define a uniqe Field ID The ID of a Field must be unique in the farm. FieldDefinition CriticalError
SPC015104: Define Field ID as valid GUID Field ID must be a valid GUID. FieldDefinition CriticalError
SPC015105: Declare required attributes in Field Required attributes ID, Name and Type must be declared in Field. FieldDefinition CriticalWarning
SPC015106: Define Field DisplayName with max. 255 characters The DisplayName of a Field is limited to 255 characters. FieldDefinition Error
SPC015107: Do not use deprecated attribute 'FromBaseType' Attribute 'FromBaseType' is deprecated in favor of the Sealed attribute. FieldDefinition CriticalWarning
SPC015108: Declare all recommended attributes in Field All recommended attributes ID, Type, Name, DisplayName, and Group should be declared in Field. FieldDefinition CriticalWarning
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. ContentTypeDefinition 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'. ContentTypeDefinition Error
SPC015203: Declare required attributes in ContentType Required attributes ID and Name must be declared in ContentType. ContentTypeDefinition CriticalError
SPC015204: Do not define duplicate ContentType ID ContentType ID must be unique. ContentTypeDefinition 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. ContentTypeDefinition 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. ContentTypeDefinition 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. ContentTypeDefinition Error
SPC015208: Do not declare obsolete attributes in ContentType The attributes 'ResourceFolder' and 'DocumentTemplate' are obsolete and should not be declared in ContentType. ContentTypeDefinition 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. ContentTypeDefinition Error
SPC015210: Define correct parent FeatureId in ContentType If ContentType defines attribute 'FeatureId' the value must be correct and include braces. ContentTypeDefinition 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. ContentTypeDefinition 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. ContentTypeDefinition 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'. ModuleDefinition 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. ModuleDefinition 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. ModuleDefinition 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'. ListInstanceDefinition Error
SPC015402: Declare required attributes in ListInstance Required attributes TemplateType, Title and Url be declared in ListInstance. ListInstanceDefinition 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. ListInstanceDefinition 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. ListInstanceDefinition CriticalError
SPC015405: Remove curly brackets from attribut FeatureId in ListInstance Curly brackets should be removed from attribute 'FeatureId' in ListInstance. ListInstanceDefinition 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. ListInstanceDefinition 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'. ListTemplateDefinition Error
SPC015502: Declare required attributes in ListTemplate Required attributes BaseType, DisplayName and Name must be declared in ListTemplate. ListTemplateDefinition CriticalError
SPC015505: Do not define ListTemplate Name with spaces Name of ListTemplate cannot contain spaces or special characters. ListTemplateDefinition Error
SPC015506: Define unique attribute 'Type' for ListTemplate The attribute 'Type' must be unique within the Feature. ListTemplateDefinition 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. ListTemplateDefinition Error
SPC015601: Do not define ContentTypeBinding in Feature with scope 'WebApplication' or 'Farm' ContentTypeBinding can only be deployed with Features of scope 'Web' or 'Site'. ContentTypeBindingDefinition Error
SPC015701: Declare required attribute in CustomAction Required attribute 'Title' must be declared in CustomAction. CustomActionDefinition Error
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. CustomActionDefinition 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. CustomActionDefinition 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. CustomActionDefinition 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. CustomActionDefinition 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. CustomActionDefinition Error
SPC015801: Declare required attributes in CustomActionGroup Required attributes 'Location' and 'Title' must be declared in CustomActionGroup. CustomActionGroupDefinition 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'. ReceiverDefinition 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. ReceiverDefinitionCollection 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. ReceiverDefinitionCollection Error
SPC016101: Define ControlAssembly and ControlClass in DelegateControl When implementing a server control (DelegateControl), use both the ControlAssembly and ControlClass attributes. DelegateControlDefinition 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. DelegateControlDefinition 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. DelegateControlDefinition CriticalError
SPC016201: Do not define Worfklow in Feature with scope 'Web', 'WebApplication' or 'Farm' Worfklow can only be deployed with Features of scope 'Site'. WorkflowDefinition Error
SPC016202: Declare required attributes in Workflow Required attributes Name, CodeBesideAssembly, CodeBesideClass and Id must be declared in Workflow. WorkflowDefinition Error
SPC016203: Define a valid GUID for attribute 'Id' in Workflow The attribute 'Id' in Workflow must be a valid GUID. WorkflowDefinition CriticalError
SPC016301: Do not define DocumentConveter in Feature with scope 'Web', 'Site' or 'Farm' DocumentConveter can only be deployed with Features of scope 'WebApplication'. DocumentConverterDefinition Error
SPC016401: Declare property 'Title' in WebParts WebPart should contain a title which is visible to the user in SharePoint. WebPartFile Error
SPC016501: Declare required attributes in FieldRef Required attributes ID, Name must be declared in FieldRef. FieldRefInCTDefinition 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. FieldRefInCTDefinition 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. FieldRefInCTDefinition Error
SPC016601: Declare required attributes in RemoveFieldRef Required attributes ID must be declared in RemoveFieldRef. RemoveFieldRefDefinition CriticalError
SPC016602: Do not declare ignored attributes in RemoveFieldRef Do not declare attributes except ID in RemoveFieldRef. All other attributes are ignored by SharePoint. RemoveFieldRefDefinition 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. RemoveFieldRefDefinition 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'. FeatureSiteTemplateAssociationDefinition Error
SPC017002: Declare required attributes in TemplateAssocation Required attributes Id and TemplateName must be declared in TemplateAssocation. FeatureSiteTemplateAssociationDefinition 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'. PropertyBagDefinition Error
SPC017401: Declare required attributes in FeatureActivationDependency Required attribute FeatureId must be declared in FeatureActivationDependency. FeatureActivationDependencyDefinition 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. FeatureActivationDependencyDefinition CriticalWarning
SPC017411: Do not add ActivationDependency to hidden Feature Features with ActivationDependency cannot be hidden. FeatureActivationDependencyDefinition 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. FeatureActivationDependencyDefinition 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. FeatureActivationDependencyDefinition 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. FeatureActivationDependencyDefinition CriticalError
SPC017415: Do not create circular chain of FeatureActivationDependencies ActivationDependencies between Features can result in a circular dependency which is not allowed. FeatureActivationDependencyDefinition 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 attribte 'Title', 'Name' and 'Direction' must be declared in the schema.xml of a ListTemplate. List Error
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. TemplateFileReference Error
SPC017701: Declare required attributes in WebTemplate Required attributes BaseTemplateID, BaseTemplateName, BaseConfigurationID and Name must be declared in WebTemplate. WebTemplateDefinition 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. WebTemplateDefinition Error
SPC017711: Declare recommended attributes in WebTemplate Attributes Title and Description should be declared in WebTemplate. WebTemplateDefinition 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
comments powered by Disqus