Previous Topic Next topic Print topic


COBCH1706 Member type <type> of <member> is not CLS compliant

The member marked as CLS compliant is not using a compliant type.

You need to either change the type to one that is compliant, or set the CLSCompliant(false) attribute for the member.

class-id myClass.
assembly-attributes.
 attribute CLSCompliant(true).

01 myfield1 binary-long unsigned attribute CLSCompliant(true).  *> change type or set attrib to false

method-id myMethod attribute CLSCompliant(true).
...
end method.
end class.

The rules for setting the CLSCompliant attribute:

  • Setting the attribute at the assembly level assumes that all members within it are CLS compliant, and the Compiler issues warnings where that is not the case.
  • When the attribute is set at the assembly level, set the attribute CLSCompliant(false) on individual members to suppress the warnings.
  • When the attribute is set on a method or field, it must also be set on the containing class or assembly.
  • When the attribute is set on a class, it must also be set on the containing assembly.
Previous Topic Next topic Print topic