System.drawing namespace not found under console application

前端 未结 7 578
悲&欢浪女
悲&欢浪女 2020-12-02 15:08

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

7条回答
  •  独厮守ぢ
    2020-12-02 16:04

    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.

提交回复
热议问题