'Microsoft.VisualBasic.ComClassAttribute' cannot be applied to a class that is declared 'MustInherit'

A class is declared with the ComClassAttribute, but its declaration specifies MustInherit.

To be eligible for COM interop, a .NET Framework class must satisfy the following requirements:

  • It must be Public, all its containers must be Public, and it must expose at least one Public member.

  • It must not be abstract, that is, it must not be declared with MustInherit.

  • It must not be generic or be declared within a generic container type.

Error ID: BC32508

To correct this error

  • Remove the MustInherit keyword from the class declaration.

    -or-

  • If the class or its containing element must be generic, remove the ComClassAttribute from the class declaration. You cannot expose it to COM.

See Also

Reference

MustInherit

ComClassAttribute

Other Resources

COM Interop