[Mono-list] Windows.Forms not found
Mladen Bestvina
bestvina at math.utah.edu
Fri Jul 6 13:08:27 EDT 2007
Thanks. It doesn't seem to make any difference if you add .dll. Let me
know if you think of something.
Mladen
Maser, Dan wrote:
> 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:bestvina at math.utah.edu]
> Sent: Friday, July 06, 2007 11:16 AM
> To: Maser, Dan
> Cc: mono-list at lists.ximian.com
> Subject: Re: [Mono-list] Windows.Forms not found
>
> Thanks Dan. I tried this, but I get:
>
> mb at hvar:~/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: mono-list-bounces at lists.ximian.com
>> [mailto:mono-list-bounces at lists.ximian.com] On Behalf Of Mladen
>>
> Bestvina
>
>> Sent: Monday, July 02, 2007 4:51 PM
>> To: mono-list at lists.ximian.com
>> 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
>>
>> =================================
>>
>> mb at hvar:~/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 - Mono-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-list
>>
>>
>>
>>
>
>
>
More information about the Mono-list
mailing list