System.Drawing namespace doesn't seem to be there in 2.0

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

I am running C# in VS 2.0 and when I do:

using System.Drawing;

I get an error saying that namespace doesn't exist. When I do System. I get
a dropdown with a bunch of namespaces but Drawing is not one.

Why not?

Thanks,

Tom
 
It is most definitely there.

You might have coded 'using System.Drawing;' but have you perchance
forgotton to include a reference to System.Drawing.dll?
 
tshad said:
I am running C# in VS 2.0 and when I do:

using System.Drawing;

I get an error saying that namespace doesn't exist. When I do System. I
get a dropdown with a bunch of namespaces but Drawing is not one.

Why not?

Thanks,

Tom
I find that System.Drawing is always included in the form1.cs code for any
new Windows Forms Application.

MSDN documentation warns that "Classes within the System.Drawing namespace
are not supported for use within a Windows or ASP.NET service. Attempting to
use these classes from within one of these application types may produce
unexpected problems, such as diminished service performance and run-time
exceptions."

Maybe that is your problem.

Rob.
 
Stephany Young said:
It is most definitely there.

You might have coded 'using System.Drawing;' but have you perchance
forgotton to include a reference to System.Drawing.dll?

That was it.

I didn't think about that because I assume that the reference to
System.Drawing was there by default - but it wasn't in this project.

Thanks,

Tom
 

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

Back
Top