System.drawing namespace not found under console application

前端 未结 7 558
悲&欢浪女
悲&欢浪女 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 15:50

    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.

    0 讨论(0)
  • 2020-12-02 15:52

    Install-Package System.Drawing.Common

    0 讨论(0)
  • 2020-12-02 15:53
    1. Add using System.Drawing;
    2. Go to solution explorer and right click on references and select add reference
    3. Click on assemblies on the left
    4. search for system.drawing
    5. check system.drawing
    6. Click OK
    7. Done
    0 讨论(0)
  • 2020-12-02 16:01

    Add reference .dll file to project. Right, Click on Project reference folder --> click on Add Reference -->.Net tab you will find System.Drawing --> click on ok this will add a reference to System.Drawing

    0 讨论(0)
  • 2020-12-02 16:02

    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;

    0 讨论(0)
  • 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.
    0 讨论(0)
提交回复
热议问题