System.drawing namespace not found under console application

klijo picture klijo · Dec 18, 2011 · Viewed 122.8k times · Source

I selected console application as my C# project. But the imports that seemed to work under windows form project doesnt seem to work here. It says that the drawing namespace does not exist.

using System.Drawing;
using System.Drawing.Imaging;

My problem is that i need to have the bitmap class. I am trying to make a command line app that does bitmap manipulations to a image. That's why i didn't chose my project to be a windows form's one.

Answer

SLaks picture SLaks · Dec 18, 2011

You need to add a reference to System.Drawing.dll.

As mentioned in the comments below this can be done as follows: In your Solution Explorer (Where all the files are shown with your project), right click the "References" folder and find System.Drawing on the .NET Tab.

enter image description here

enter image description here