System.drawing namespace not found under console application
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;
- Add using System.Drawing;
- Go to solution explorer and right click on references and select add reference
- Click on assemblies on the left
- search for system.drawing
- check system.drawing
- Click OK
- Done
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
- In
Solution Explorer
, right-click on theproject node
and clickAdd Reference.
- In the Add Reference dialog box, select the tab indicating the type of component you want to reference.
-
Select the
System.Drawing.dll
to reference, then click OK.