Login | Sign Up
ErrorKey - Search engine for Error codes and messages       Comment an error
Return to search results
  Compiler Error CS0246 Updated: July 2008  -  MICROSOFT
The type or namespace name 'type/namespace' could not be found (are you missing a using directive or an assembly reference?) A type was not found. You may have forgotten to reference (/reference) the assembly that contains the type or you may not have correctly qualified its use with the using directive. There are several reasons for this error: The name of the type or namespace you are trying to use may be misspelled (including the correct case). Without the correct name the compiler is unable to find the definition for the type or namespace you have referred to in your code. This occurs most often because C# is case-sensitive and the correct casing has not been used when referring to the type. For example, Dataset ds; will generate CS0246; notice the s in Dataset is not capitalized. If the error is for a namespace name, you may not have referenced (/reference) the assembly containing the namespace. For example, your code might contain using Accessibility;. However, if your project doesn't reference the assembly Accessibility.dll then you will get CS0246. See Add Reference Dialog Box for information on how to add a reference in the development environment. If the error is for a type name, you may not have the proper using directive, or you have not fully qualified the name of the type. Consider the following line of code: DataSet ds;. To be able to use the DataSet type you would need to do two things. First, you need
d a reference to the assembly that contains the  ...  Login to see more
C# .Net Compiler Errors and Warnings

You must login to post a comment.