[Mono-list] Windows.Forms not found
Maser, Dan
Dan.Maser at inin.com
Fri Jul 6 13:14:28 EDT 2007
My guess is that there's a problem with your mono installation. Here
are things to check:
1. My mono is installed in /usr/local/lib/mono. Is the path
"/usr/local/lib" in your /etc/ld.so.conf file or your user
$LD_LIBRARY_PATH variable?
2. I have the System.Windows.Forms.dll in a few places under the
/usr/local/lib, do you?
mono/1.0/System.Windows.Forms.dll
mono/2.0/System.Windows.Forms.dll
mono/gac/System.Windows.Forms/1.0.5000..../System.Windows.Forms.dll
mono/gac/System.Windows.Forms/2.0.0.0_..../System.Windows.Forms.dll
If you have those files my next guess is that your lib path doesn't
include the place where your mono dlls are.
-----Original Message-----
From: Mladen Bestvina [mailto:bestvina at math.utah.edu]
Sent: Friday, July 06, 2007 12:08 PM
To: Maser, Dan
Cc: mono-list at lists.ximian.com
Subject: Re: [Mono-list] Windows.Forms not found
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