I checked my machine and I have the ".dll" extension in my command line
"-r:System.Window.Forms.dll" If adding the ".dll" to your example doesn't work then I'm out of ideas :) -----Original Message----- From: Mladen Bestvina [mailto:[EMAIL PROTECTED] Sent: Friday, July 06, 2007 11:16 AM To: Maser, Dan Cc: [email protected] Subject: Re: [Mono-list] Windows.Forms not found Thanks Dan. I tried this, but I get: [EMAIL PROTECTED]:~/mono$ mcs -r:System.Drawing -r:System.Windows.Forms sample.cs error CS0006: cannot find metadata file `System.Windows.Forms' Compilation failed: 1 error(s), 0 warnings Maser, Dan wrote: > You need to add the reference to System.Windows.Forms just like you > did System.Drawing. Such as "mcs -r:System.Drawing > -r:System.Windows.Forms sample.cs" > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mladen Bestvina > Sent: Monday, July 02, 2007 4:51 PM > To: [email protected] > Subject: [Mono-list] Windows.Forms not found > > Hello! > > The compilation of the code below fails, apparently because > Windows.Forms cannot be found on the system. I do have > Windows.Forms.dll. I am using Ubuntu Feisty Fawn and I installed mono > from ubuntu packages. > > Any advice is appreciated. > > Mladen > > ================================= > > [EMAIL PROTECTED]:~/mono$ mcs -r:System.Drawing sample.cs > sample.cs(3,7): error CS0234: The type or namespace name `Windows' does > not exist in the namespace `System'. Are you missing an assembly > reference? > sample.cs(3,1): error CS0246: The type or namespace name `Windows.Forms' > > could not be found. Are you missing a using directive or an assembly > reference? > Compilation failed: 2 error(s), 0 warnings > > > > =========================================== > > using System; > using System.Drawing; > using System.Windows.Forms; > > public class HelloWorld : Form > { > static public void Main () > { > Application.Run (new HelloWorld ()); > } > > public HelloWorld () > { > Button b = new Button (); > b.Text = "Click Me!"; > b.Click += new EventHandler (Button_Click); > Controls.Add (b); > } > > private void Button_Click (object sender, EventArgs e) > { > MessageBox.Show ("Button Clicked!"); > } > } > _______________________________________________ > Mono-list maillist - [email protected] > http://lists.ximian.com/mailman/listinfo/mono-list > > > _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
