[Mono-list] namespace System.Windows.Forms cannot be found
Gilles FAVIER
gilles.favier2605@wanadoo.fr
Wed, 13 Apr 2005 13:16:01 +0200 (CEST)
Hi Danny,
I am not an expert but i ran in the same kind of trouble like you before...
Well the command you run to compile has to look like this :
mcs hello.cs /r:System.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll
You can find a lot of very interesting information there :
http://bdn.borland.com/article/0,1410,32073,00.html
and on the same website
cheers
Gilles
> Message du 13/04/05 12:16
> De : "Armand du Plessis" <armand@dotnet.org.za>
> A : mono-list@lists.ximian.com
> Copie à :
> Objet : RE: [Mono-list] namespace System.Windows.Forms cannot be found
>
> 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
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>
>