What means this error: CS0246: The type or namespace name 'xxxx' could not be found

J

Joe DeAngelo

When I try to compile a source code which should normally run I got this error message

error CS0246: The type or namespace name 'XmlSchemaSet' could not be found (are you missing a
using directive or an assembly reference

Platform SDK 1.1 is successfuly installed (under Win2000+SP4)

So how can cope with this problem?

Joe
 
Y

Your_name

(e-mail address removed) (Joe DeAngelo) wrote in online.com:
XmlSchemaSet

It means what it says :D

If XmlSchemaSet is in an assembly then add a reference to it.

If it is in a class file you wrote make sure it gets compiled.

If its in a namespace like YourCompany.YourXmlStuff then add the using
directive to the top of the class that won't compile.

using YourCompany.YourXmlStuff;
 
J

Jon Skeet [C# MVP]

Joe DeAngelo said:
When I try to compile a source code which should normally run I got
this error message

error CS0246: The type or namespace name 'XmlSchemaSet' could not be
found (are you missing a using directive or an assembly reference

Platform SDK 1.1 is successfuly installed (under Win2000+SP4)

So how can cope with this problem?

Well, what type are you trying to use? I don't see XmlSchemaSet in
MSDN...
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

That should be one of several things:
1- You used a namespace and forgot to include a reference to it in your
project.
2- You forgot to use an "using NameSpace;" line in your code.
3- A mispelling, if csc find a variable it does not the type give this
error.
A will give you an example

if you put this:
misspelled_variable = 4;
the compiler will say "the name misspelled_variable does not exist in
...."

but if you put this:
misspelled_variable.membername = 4;

it will give you the error you are getting


Hope this help,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top