Expand Minimize

Do not define duplicate ContentType ID

ContentType ID must be unique.

CheckId SPC015204
TypeName DoNotDefineDuplicateContentTypeID
Severity Error
Type ContentType

The ID of a ContentType must beunique. In some case the id of a content type could be used more than once because of copy-paste errors during development. See sample below:

<ContentType
   ID="0x0102001E41EAB6184B11E0AE8631B7DFD7208553"
   Name="$Resources:Document"
   Group="$Resources:Document_Content_Types"
   Description="$Resources:DocumentCTDesc"
   Version="0">
   <FieldRefs>
      ...
   </FieldRefs>  
</ContentType>

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":"SPC015204:DoNotDefineDuplicateContentTypeID","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.