Expand Minimize

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.

CheckId SPC012206
TypeName DeclareFieldTypeClassInFieldType
Severity CriticalError
Type FieldType

Add <Field Name="FieldTypeClass" /> to custom field types. See sample below:

<Field>
   <Field Name="TypeName">RegularExpressionField</Field>
   <Field Name="FieldTypeClass">CustomFieldTypes.RegularExpression.RegularExpressionField, CustomFieldTypes.RegularExpression, Version=1.0.0.0, Culture=neutral, PublicKeyToken=57e55365ec0ce80a</Field>
   ...
</Field>

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":"SPC012206:DeclareFieldTypeClassInFieldType","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 AB. 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.