Here’s the basic information:
- I’ve been studying Rob Miles’ C# Yellow Book 2011 extensively.
- I’m on page 155 of 197 (mostly finished) and coming to the part about forms/guis.
- I use Notepad++ and NppExec for quick compiling and easy editing (I just personally loathe VisualStudio… I don’t like having things done for me.)
- I’m using .NET 4.0’s compiler
- I’ve set up csc.rsp to include:
- System.Windows.Forms.dll
- System.Drawing.dll
- System.Drawing.Design.dll
- and the other required resource references.
- I’ve double-checked all my references.
- I include all required “using” statements in my code.
And the problem:
Every time I try to compile a piece of code which makes use of any form methods I get this error:
error CS0234: The type or namespace name 'Windows' does not exist in the namespace 'System' (are you missing an assembly reference?)
I’ve looked everywhere. What can I do to resolve this issue?
PS – if you really want or need to see the code, I can paste it in a response. I won’t do it unless someone asks because it’s kinda long.
If it can’t find Windows under System, then your reference to System.Windows.Forms.dll isn’t working. You don’t show exactly how you are doing that, but: that is the problem. So: however you are using csc.rsp, it isn’t working. Are you perhaps using
/noconfig? Have you edited the right file? Did you edit it as an admin user? If you open csc.rsp in an editor, are your changed there?