[Mono-winforms-list] newbie questions trying to get winforms working

dan dan at productengineering.com
Tue Nov 22 23:45:15 EST 2005


I was having some trouble with Windows.Form in mono, but I think I got 
it working.  So far, everything seems to run in Mono in FC4, XP and 
CE.NET with the compact framework.  But so far, that's only if you build 
it against the Compact Framework dlls with the microsoft compiler.  I'm 
not sure why, but for now, that's what I'm going with.  A few things 
struck me as odd:

Is it right that there are multiple version of the libraries in the build?:
$rpm -ql mono-winforms | grep System.Drawing.Design.dll
/usr/lib/mono/gac/System.Drawing.Design/1.0.5000.0__b03f5f7f11d50a3a/System.Drawing.Design.dll
/usr/lib/mono/gac/System.Drawing.Design/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.Design.dll

When I built the file, it wouldn't work with the 2.0.0.0 versions:
$mcs 
-r:/usr/lib/mono/gac/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll 
-r:/usr/lib/mono/gac/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll 
practise.cs

####error snipet##########
practise.cs(26,4): The type Point has two conflicting definitions, one 
comes from System.Drawing, Version=2.0.0.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a and the other from System.Drawing, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3aerror
#####################
The 1.0.5 versions worked:
$ mcs 
-r:/usr/lib/mono/gac/System.Windows.Forms/1.0.5000.0__b77a5c561934e089/System.Windows.Forms.dll 
-r:/usr/lib/mono/gac/System.Drawing/1.0.5000.0__b03f5f7f11d50a3a/System.Drawing.dll 
practise.cs

Also, the export MONO_PATH=/usr/lib/mono/2.0/ wasn't set with the 
installer (www.nrpms.net) for fedora core 4.  I poked around the mono 
site and found that one. I dumped it in here:

$ more /etc/profile.d/mono.sh
#!/bin/sh
export MONO_PATH=/usr/lib/mono/2.0/




More information about the Mono-winforms-list mailing list