[Mono-winforms-list] Running winforms on Linux

Miguel de Icaza miguel@ximian.com
16 Oct 2003 15:18:49 -0400


Hello,

> I already have it installed, but it doesn't work.
> If I write the following:
> /using System;
> using System.WinForms;
> 
> public class TempConverter : System.WinForms.Form {
> 
> 
>    public TempConverter() {
>    }
> 
>    public static void Main() {
>       Application.Run( new TempConverter() );
>    }
> 
> }/
> 
> And try to compile it with:
> mcs -o test3.exe test3.cs
> 
> I will get:
> test3.cs(4) error CS0246: Cannot find type `System.WinForms.Form'
> Compilation failed: 1 error(s), 0 warnings

Very easy, you need to reference the assembly:

	mcs -r:System.Windows.Forms test3.cs