0

I am developing a program in C# which should include graphic output. I was used to commonly use Drawing library by adding it to references in project tree, but this seems to be different now, because it no longer works for me.

I can see System.Drawing.dll reference in SDK bundle in the project structure, and as well I managed to add the reference manually into the project build, but once I try to write some code, intellisense doesn't provide any classes from given library such as SolidBrush, Color etc.

I would like to add reference to System.Drawing and use its classes in my code. I've struggled with this for more than a week. Many thanks in advance.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Jakub Sluka
  • 123
  • 1
  • 14
  • 2
    What type of project do you have, and is it 2019 or 2015 after all? – GSerg May 20 '19 at 08:37
  • 1
    What type of project? In WinForms, System.Drawing is included automatically. No changes since VS2003. – H H May 20 '19 at 08:48
  • It is to be included in WinForm but at the moment I am runnin algorithm tests in console. I just need to draw the output in some jpg file. Thanks Jakub – Jakub Sluka May 20 '19 at 09:28
  • 1
    Have you actually [added a reference to System.Drawing](https://stackoverflow.com/a/8553144/11683), which console apps lack? And is you console app [Core](https://stackoverflow.com/q/40892189/11683) by any chance? – GSerg May 20 '19 at 10:37
  • I will take a look and share some screens when Im home – Jakub Sluka May 20 '19 at 12:56
  • Ok, the problem is now following. I can use the Drawing Library, but only by specifying whole namespace f.e System,Drawing.Color even though i wrote using System.Drawing; in the beginning of the document. Another thing is that it only offers few classes like Rectangle, Size etc. . Any ideas? Thanks. – Jakub Sluka May 20 '19 at 19:15

1 Answers1

0

This is a late answer but where I work we use VS 2019 and I came across the same problem:

The intellisense did not find System.Drawing.Image, but we too saw that it is in the reference (System.Drawing).

The solution: In the Package Manager we found a package named System.Drawing.Common. This had Bitmap and Image and now it works.

Actually this was the solution for some of us, but not all. One of my colleagues still has this problem even with the installed package.

SjoCi
  • 101
  • 6