Expand Minimize

SPC015405: Remove curly brackets from attribute FeatureId in ListInstance

Curly brackets should be removed from attribute 'FeatureId' in ListInstance.

CheckId SPC015405
TypeName RemoveCurlyBracketsFromFeatureIdInListInstance
Severity Warning
Type ListInstance

Remove curly brackets from attribute 'FeatureId' in ListInstance. See sample below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <ListInstance  
      Id="WssAdminTasks"  
      Title="Administrator Tasks"  
      TemplateType="1200"  
      FeatureId="00bfea71-de22-43b2-a848-c05709900100"
      Url="Lists/ListInstance2" >
   </ListInstance>
</Elements>

The MSDN documentation does not state explicitly that curly brackets are not allowed in attribute 'FeatureId'. However, in all samples in MSDN the attribute contains no curly brackets. To achieve an universal appearance of this attribute the curly brackets should be removed.

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":"SPC015405:RemoveCurlyBracketsFromFeatureIdInListInstance","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.