Type 'System.drawing.bitmap' is not defined

fatron

Member
Joined
May 13, 2010
Messages
18
Programming Experience
1-3
I', working on a program where there are several projects within a solution. The solution contains a forms application, a couple of class libraries, and a public interface.

I'm running into a strange problem where I can access the system.drawing.bitmap namespace from the main form and from one of the class libraries, but when I try to access it from the other class library or the interface, it tells me it is not defined. I've tried importing it, and calling it directly with no luck. Any suggestions?

Thanks.
 
Class library projects doesn't reference System.Drawing by default, but if you add a control/form to it the reference is automatically added (including System.Windows.Forms reference). Windows Forms Application projects has them included since they already contain a form with these dependencies.
 
Class library projects doesn't reference System.Drawing by default, but if you add a control/form to it the reference is automatically added (including System.Windows.Forms reference). Windows Forms Application projects has them included since they already contain a form with these dependencies.

The Windows Control Library project template also includes references to System.Windows.Forms.dll and System.Drawing.dll by default.
 
Back
Top