'<name1>' for the Imports '<name2>' does not refer to a Namespace, Class, Structure, Enum or Module

You have attempted to use the Imports statement on something that is not a Namespace, Class, Structure, Enum, or Module. The Imports statement imports namespace names from referenced projects and assemblies, or it imports namespace names defined within the same project as the module in which the statement appears.

Error ID: BC30467

To correct this error

  • Check the entity that you are trying to import, and make sure it is valid for use with an Imports statement.

See Also

Tasks

How to: Add or Remove References in Visual Studio (Visual Basic)

Concepts

References and the Imports Statement

Reference

Imports Statement (.NET Namespace and Type)