BC40032: Underlying type <typename> of Enum is not CLS-compliant
The data type specified for this enumeration is not part of the Language Independence and Language-Independent Components (CLS). This is not an error within your component, because the .NET Framework and Visual Basic support this data type. However, another component written in strictly CLS-compliant code might not support this data type. Such a component might not be able to interact successfully with your component.
The following Visual Basic data types are not CLS-compliant:
By default, this message is a warning. For more information on hiding warnings or treating warnings as errors, see Configuring Warnings in Visual Basic.
Error ID: BC40032
To correct this error
If your component interfaces only with other .NET Framework components, or does not interface with any other components, you do not need to change anything.
If you are interfacing with a component not written for the .NET Framework, you might be able to determine, either through reflection or from documentation, whether it supports this data type. If it does, you do not need to change anything.
If you are interfacing with a component that does not support this data type, you must replace it with the closest CLS-compliant type. For example, in place of
UInteger
you might be able to useInteger
if you do not need the value range above 2,147,483,647. If you do need the extended range, you can replaceUInteger
withLong
.If you are interfacing with Automation or COM objects, keep in mind that some types have different data widths than in the .NET Framework. For example,
uint
is often 16 bits in other environments. If you are passing a 16-bit argument to such a component, declare it asUShort
instead ofUInteger
in your managed Visual Basic code.
See also
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for