Export (0) Print
Expand All
Expand Minimize
1 out of 6 rated this helpful - Rate this topic

Compiler Error CS0234

The type or namespace name 'name' does not exist in the namespace 'namespace' (are you missing an assembly reference?)

A type was expected. Possible causes for this error include the following:

If you see this error after moving code from one development machine to another, make sure that the project on the new machine has the correct references, and that the versions of the assemblies are the same as on the old machine. You can also use the Object Browser to inspect an assembly and verify whether it contains the types that you expect it to contain.

The following sample generates CS0234:

// CS0234.cs
public class C
{
   public static void Main()
   {
      System.DateTime x = new System.DateTim();   // CS0234
      // try the following line instead
      // System.DateTime x = new System.DateTime();
   }
}
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.