Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Drawing does not exist?

I'm trying to create a validation image using class library in asp.net, but that is not the question.

Anyway, my question is... well... system.drawing does not exist so I cant use "bitmap". From similar questions, people tell to add reference. But I already did that, restarted my computer etc. It doesn't work.

What can I do besides adding reference? It doesn't work or am I doing it wrong ?

Here is basically what I did:

  • Right click to references, which is under solution,
  • add reference
  • add system.drawing

But still, it does not appear in intellisense or tells me "it does not exist, try adding reference" when I type it manually.

picture

like image 979
4box Avatar asked Aug 04 '11 11:08

4box


3 Answers

I suspect that you added the System.Drawing reference to the wrong project. Please verify that the Validator.cs file in the project that has the System.Drawing reference.

like image 64
CodeNaked Avatar answered Oct 10 '22 16:10

CodeNaked


You can add referrence 'System.Drawing.dll' to your project.

enter image description here

like image 32
Fazlul Hoque Avatar answered Oct 10 '22 15:10

Fazlul Hoque


I had the same issue and solved it, click on the project menu, then Add reference, reference manager will open, then click on the assemblies tab, search for System.Drawing and check it then press ok. it will recognize the package or name space.

like image 7
Ssebbaale Paul Avatar answered Oct 10 '22 14:10

Ssebbaale Paul