System.drawing namespace not found under console application

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.


  1. Right click on properties of Console Application.
  2. Check Target framework
  3. If it is .net framework 4.0 Client Profile than change it to .NET Framework 4.0

It is work now.

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.

If you are using Visual Studio 2010 or plus then check the target framework that is it .Net Framework 4.0 or .Net Framework 4.0 Client Profile. then change is to .Net Framework 4.0.

You need to add reference this .dll file (System.Drawing.dll) to perform drawing operations.

If it is OK then follow these steps to add reference to System.Drawing.dll

  1. In Solution Explorer, right-click on the project node and click Add Reference.
  2. In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
  3. Select the System.Drawing.dll to reference, then click OK.

For,Adding System.Drawing Follow some steps: Firstly, right click on the solution and click on add Reference. Secondly, Select the .NET Folder. And then double click on the Using.System.Drawing;

Need Your Help

Android - Animation in series on the same button

android animation sequence

I have a simple application with a few buttons.

How to recieve and display JSON erroneous response in case of mvc Ajax in MVC 3.0 App exception

I am using CustomErrorHandler attribute for handling errors in my mvc application. The code is as follows:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.