Export (0) Print
Expand All
Expand Minimize

'<elementname>' for the Imports alias to '<qualifiedelementname>' does not refer to a Namespace, Class, Structure, Interface, Enum or Module

An Imports Statement (.NET Namespace and Type) specifies a programming element that cannot be imported.

The Imports statement is used to reduce or remove the need for a qualifying string in front of an element name. You qualify the element in the Imports statement itself to provide an unambiguous path to a unique declaration of the element. Thereafter, you do not need to qualify references to the element.

Imports is most commonly used for namespaces, but you can also import a class, module, structure, interface, or enumeration to allow reference to its elements without a long qualifying string.

For more information, see "Importing Containing Elements" in Resolving a Reference When Multiple Variables Have the Same Name.

Error ID: BC30798

To correct this error

  1. Check the spelling of the elements in the qualification string in the Imports statement, especially the last element in the string, which is the element you are qualifying.

  2. Verify that the element you are qualifying is of an eligible type (namespace, class, module, structure, interface, or enumeration). If it is not, remove the Imports statement.

Community Additions

ADD
Show:
© 2015 Microsoft