The class contains a member marked with the CLSCompliantAttribute attribute, but the class itself is not marked with the CLSCompliantAttribute attribute. A class must be marked as CLS compliant if any class member is marked as CLS compliant.
To correct this error
-
Make sure to apply the CLSCompliantAttribute attribute to each class that has members marked with the CLSCompliantAttribute attribute.