Name <namespacename> in the root namespace <fullnamespacename> is not CLS-compliant
Collapse the table of content
Expand the table of content

Name <namespacename> in the root namespace <fullnamespacename> is not CLS-compliant


An assembly is marked as <CLSCompliant(True)>, but an element of the root namespace name begins with an underscore (_).

A programming element can contain one or more underscores, but to be compliant with the Language Independence and Language-Independent Components (CLS), it must not begin with an underscore. See Declared Element Names (Visual Basic).

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: BC40039

To correct this error

  • If you require CLS compliance, change the root namespace name so that none of its elements begins with an underscore.

  • If you require that the namespace name remain unchanged, then remove the CLSCompliantAttribute from the assembly or mark it as <CLSCompliant(False)>.

© 2016 Microsoft