BC40033: Non-CLS-compliant <membername> is not allowed in a CLS-compliant interface

A property, procedure, or event in an interface is marked as <CLSCompliant(True)> when the interface itself is marked as <CLSCompliant(False)> or is not marked.

For an interface to be compliant with the Language Independence and Language-Independent Components (CLS), all its members must be compliant.

When you apply the CLSCompliantAttribute to a programming element, you set the attribute's isCompliant parameter to either True or False to indicate compliance or noncompliance. There is no default for this parameter, and you must supply a value.

If you do not apply the CLSCompliantAttribute to an element, it is considered to be noncompliant.

By default, this message is a warning. For information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.

Error ID: BC40033

To correct this error

  • If you require CLS compliance and have control over the interface source code, mark the interface as <CLSCompliant(True)> if all its members are compliant.

  • If you require CLS compliance and do not have control over the interface source code, or if it does not qualify to be compliant, define this member within a different interface.

  • If you require that this member remain within its current interface, remove the CLSCompliantAttribute from its definition or mark it as <CLSCompliant(False)>.

See also