Expand Minimize

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.

CheckId SPC015406
TypeName DeployMissingCustomSchemaForListInstance
Severity CriticalError
Type ListInstance

Deploy the specified ListDefinition or remove the ListInstance. See sample below:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
      Title="Solution Gallery"  
      RootWebOnly="TRUE" xmlns="http://schemas.microsoft.com/sharepoint/" />

Expected Schema.xml in Feature:
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Id="a3342be9-2b7c-44c5-a0c5-0259343a4000" Scope="Web" ...>  
      <ElementFile Location="Files\_catalogs\solutions\Schema.xml" />

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":"SPC015406:DeployMissingCustomSchemaForListInstance","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.