[Mono-list] Missing a trick

Gavin Hamill gdh at acentral.co.uk
Thu Jul 7 20:18:27 EDT 2005


OK, I must be missing something, but I don't know what. I have Mono 1.1.7 on 
Ubuntu and am trying to run very simple Windows.Forms apps... 

For good measure, I have also "gacutil -u" the Windows.Forms.dll and 'gacutil 
-i' the latest one with the same result:

e.g. http://svn.myrealbox.com/viewcvs/trunk/winforms/hello/swf-hello.cs

gdh at plip:~/net$ mcs 
swf-hello.cs  /r:System.Windows.Forms /r:System.Drawing /r:System.Data
gdh at plip:~/net$ mono swf-hello.exe
Mono System.Windows.Forms Assembly [Revision: 44786; built: 2005/5/25 
22:34:45]

Unhandled Exception: System.TypeInitializationException: An exception was 
thrown by the type initializer for System.Windows.Forms.XplatUI ---> 
System.Reflection.TargetInvocationException: Exception has been thrown by the 
target of an invocation. ---> System.NotSupportedException: Either image 
format is unknown or you don't have the required libraries for this format.
in <0x0014a> System.Drawing.GDIPlus:CheckStatus (Status status)
in <0x000ca> System.Drawing.Image:InitFromStream (System.IO.Stream stream)
in (wrapper remoting-invoke-with-check) System.Drawing.Image:InitFromStream 
(System.IO.Stream)
in <0x00104> System.Drawing.Bitmap:.ctor 
(System.Runtime.Serialization.SerializationInfo info, StreamingContext 
context)
in <0x00000> <unknown method>
in (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke 
(object,object[])
in <0x0006f> System.Reflection.MonoCMethod:Invoke (System.Object obj, 
BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] 
parameters, System.Globalization.CultureInfo culture)--- End of inner 
exception stack trace ---

in <0x00104> System.Reflection.MonoCMethod:Invoke (System.Object obj, 
BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] 
parameters, System.Globalization.CultureInfo culture)
in <0x00017> System.Reflection.MethodBase:Invoke (System.Object obj, 
System.Object[] parameters)

How can I fix this and run this superficial application?

Cheers,
Gavin.


More information about the Mono-list mailing list