Expand Minimize

Declare required attributes in ListInstance

Required attributes TemplateType, Title and Url be declared in ListInstance.

CheckId SPC015402
TypeName DeclareRequiredAttributesInListInstance
Severity CriticalError
Type ListInstance

Add required attributes TemplateType, Title and Url to ListInstance.

The attribute 'FeatureId' is also defined as Required in the documentation but it can be left empty and will not be checked by this rule.

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <ListInstance  
      Id="WssAdminTasks"  
      Title="Administrator Tasks"  
      Description="Create an Administrator Tasks list to track a group of admin work items."
      TemplateType="1200"  
      Url="Lists/AdminTasks">
      ...
   </ListInstance>
</Elements>

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.

<!-- "SuppressMessage":{"rule":"SPC015402:DeclareRequiredAttributesInListInstance","justification":"Provide reason for suppression here"} -->
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.