[Mono-list] namespace System.Windows.Forms cannot be found
Danny Brugman
dbrugman@xs4all.nl
Wed, 13 Apr 2005 11:37:10 +0200
Hi,
This might be a real beginners-question, but I couldn't
find an answer anywhere on the internet, nor in the
gnome documentation / Windows Forms home page.
Issue is that I try to compile a very simple hello-world
winforms application (Linux, Fedora FC3). I installed
mono 1.1.6 + winforms rpm + all required dependencies
(libgdiplus, cairo, etc), and I see a System.Windows.Forms
directory in '/usr/lib/mono/gac/'.
After invoking mcs I get the following error:
hello.cs(2) error CS0234: The type or namespace name `Windows' could not
be found innamespace `System'
Could someone please help me out?
Many thanks,
Danny Brugman
BTW Here is the source:
using System;
using System.Windows.Forms;
using System.Drawing;
class MyForm : Form
{
MyForm ()
{
Text = "My First MWF App";
}
protected override void OnPaint (PaintEventArgs e)
{
e.Graphics.DrawString ("Hello world", Font,
new SolidBrush (Color.Black), ClientRectangle);
}
static void Main ()
{
Application.Run (new MyForm ());
}
}