ho installato mono 2.0.1 dal rep 12.2 di slacky
Ho provato a scrivere una piccola applicazione windows form che ho trovato nei tutorial ufficiali:
Codice: Seleziona tutto
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!");
}
}
Codice: Seleziona tutto
gmcs -pkg:dotnet hello.cs
Però
Codice: Seleziona tutto
mono hello.exeQualcuno ha avuto lo stesso problema?Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.WindowsFormsSynchronizationContext ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeEngine ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Windows.Forms.ThemeWin32Classic ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: gdiplus.dll
at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
at System.Drawing.GDIPlus..cctor () [0x00000]
--- End of inner exception stack trace ---
at System.Drawing.KnownColors..cctor () [0x00000]
--- End of inner exception stack trace ---
at System.Drawing.Color.get_Black () [0x00000]
at System.Windows.Forms.ThemeWin32Classic..cctor () [0x00000]
--- End of inner exception stack trace ---
at System.Windows.Forms.ThemeEngine..cctor () [0x00000]
--- End of inner exception stack trace ---
at System.Windows.Forms.SystemInformation.get_MenuAccessKeysUnderlined () [0x00000]
at System.Windows.Forms.Control..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:.ctor ()
at System.Windows.Forms.WindowsFormsSynchronizationContext..cctor () [0x00000]
--- End of inner exception stack trace ---
at System.Windows.Forms.Control..ctor () [0x00000]
at System.Windows.Forms.ScrollableControl..ctor () [0x00000]
at System.Windows.Forms.ContainerControl..ctor () [0x00000]
at System.Windows.Forms.Form..ctor () [0x00000]
at HelloWorld..ctor () [0x00000]
at (wrapper remoting-invoke-with-check) HelloWorld:.ctor ()
at HelloWorld.Main () [0x00000]
Grazie in anticipo


