[Mono-list] namespace System.Windows.Forms cannot be found

Armand du Plessis armand@dotnet.org.za
Wed, 13 Apr 2005 11:48:36 +0200


What is the command line you used to compile the application?

Did you reference the System.Windows.Forms assembly when you compiled? 

The command line option :  -reference:ASS     References the specified
assembly (-r:ASS) 

hth,

Armand



-----Original Message-----
From: mono-list-admin@lists.ximian.com
[mailto:mono-list-admin@lists.ximian.com] On Behalf Of Danny Brugman
Sent: 13 April 2005 11:37 AM
To: mono-list@lists.ximian.com
Subject: [Mono-list] namespace System.Windows.Forms cannot be found

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 ());
   }
}
_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list