开发者

System.Drawing does not exist?

I'm trying to create a validation image using class library in asp.net, b开发者_JAVA技巧ut 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.

System.Drawing does not exist?


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.


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

System.Drawing does not exist?


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.

System.Drawing does not exist?

System.Drawing does not exist?


I stumbled this error even referencing assembly. After thinking i realised that that error produced after adding a class file which is under 'System' folder which i produced on the project folder. That class has ##.System.## namespace as well under the folder. .Net produced error if you have any custom namespace which contains 'System' keyword. Try changing folder name and namespace if u stumbled as well.


Click on the Project tab and then on Add Reference…

System.Drawing does not exist?

Then select System.Drawing or whatever you want.


In addition to adding the reference, you will also need to import it using the using statement in the top of your code file:

using System.Drawing;


You should change .NET Framework version to .NET 4.0


I have also encountered the same problem. I found that a console/class library project cannot add a reference to System.Drawing. When I changed to use a Window Form project, I was able to add a Bitmap with a reference to System.Drawing.


The error is because you have not added any user control to your class library project. Add a user control to your class library project, and the error will vanish.


I had same problem. I was trying to add Reference to System.Drawing.dll via System Explorer, but it didn't help me. Finally, I put cursor on the varialbe of type 'Graphics', clicked Ctrl+. or 'Alt+Enter->Refactoring' and select 'using System.Drawing'. I don't understand why and how, but it solved my problem.

System.Drawing does not exist?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜