Tony
Tony

Reputation: 43

using System::Drawing namespace in managed C++ class library

I am moving a few functions from a Managed C++ Winforms app to a class library so that I can call them in a new C# app I'm writing. However one of the functions returns a System::Drawing::Bitmap^ and uses the System::Drawing::Color class which is causing an error saying that System does not contain a namespace called Drawing ...

Obviously it does, but I'm guessing that since a class library does not intrinsically have a graphical element to it like a winform does that there may be an extra step for accessing the functionality?

What do i need to add/link-to?

Thank you in advance.

Tony.

Upvotes: 4

Views: 5254

Answers (1)

Idan K
Idan K

Reputation: 20891

You probably need to add a reference to System.Drawing.dll. Right-click your project and choose "Add Reference", it should be there somewhere.

Upvotes: 2

Related Questions