Export (0) Print
Expand All
Expand Minimize

Compiler Error CS0400

The type or namespace name 'identifier' could not be found in the global namespace (are you missing an assembly reference?)

The identifier scoped with the global scope operator (::) was not found in the global namespace. You may be missing an assembly reference that contains the identifier, or the identifier may be declared in a class or namespace other than the global namespace. This error could also occur if a globally scoped identifier is not declared or is misspelled.

To avoid this error, locate the declaration of the identifier, verify the correct spelling, and if the declaration is in a separate assembly, make sure that you have the appropriate assembly reference. If the identifier is declared inside another type or namespace, use the fully-qualified name after the ::. The following sample generates CS0400:

// CS0400.cs
class C
{
    public static void Main()
    {
        // CS0400 - D could not be found 
        // in the global namespace.
        global::D d = new global::D();
   }
}

Community Additions

ADD
Show:
© 2014 Microsoft