Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, March 12, 2015 5:28 PM
Hey, I get this error: "The type or namespace name 'Color' could not be found (are you missing a using directive or an assembly reference?)"
I tried google but cant find anything related to a 'Color' assembly reference.
All replies (5)
Thursday, March 12, 2015 7:55 PM ✅Answered
Then notice the second part of the suggestion: “are you missing […] an assembly reference?”. You need a reference to System.Drawing assembly. Go to Solution Explorer, find the “References” node, right-click and select “Add Reference”. (Or select the project, then go to menu, PROJECT à Add Reference). Then add a reference to System.Drawing (https://msdn.microsoft.com/en-us/library/7314433t%28v=vs.90%29.aspx).
If still errors, then show some details about the code.
Thursday, March 12, 2015 6:53 PM
Am I just dumb for not figuring out or does no one have a clue?
Thursday, March 12, 2015 7:11 PM
If you see some ‘using’ directives at the beginning of the file, then add this one:
using System.Drawing;
If now you receive other errors, perhaps caused by missing assembly, then show them.
Thursday, March 12, 2015 7:15 PM
If you see some ‘using’ directives at the beginning of the file, then add this one:
using System.Drawing;
If now you receive other errors, perhaps caused by missing assembly, then show them.
Thank you for your reply!
"using System.Drawing;" was already there when I got the error.
using System;
using System.Text;
using System.Data;
using System.Drawing;
using System.Threading;
using System.Reflection;
using System.Windows.Forms;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.ComponentModel;
using System.Diagnostics;
using SlimDX.Direct3D9;
using SlimDX;
using System.Linq;
Thursday, March 12, 2015 8:31 PM
It worked, thank you very much! =)