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

Peter Dennis Bartok peter at novonyx.com
Thu Nov 24 12:26:47 EST 2005


Dan,

Your questions aren't really winforms specific, so 
mono-list at lists.ximian.com might be a better place to ask.

However, yes, it is correct that there are multiple versions of the 
libraries. One for the .Net 1.1 Framework, and one for the .Net 2.0 
Framework.

When compiling, don't specify the whole path. Simply saying
"mcs ... -r:System.Drawing.Design.dll"
is enough, it will pick the appropriate assembly. When you want to use the 
2.0 versions, you need to use the 2.0 compiler, gmcs. In other words,
"gmcs ... -r:System.Drawing.Design.dll"
will use the 2.0 versions of the assemblies (and you get to use all the 
features that were added for .Net 2.0 to the language, like generics, as 
well as the 2.0 methods and properties of each assembly)

You also usually don't need to set the path, it's all triggered by which 
compiler (mcs or gmcs) you use.

Cheers,
 Peter

-----Original Message-----
From: "dan" <dan at productengineering.com>
To: <mono-winforms-list at lists.ximian.com>
Date: Thursday, 24 November, 2005 08:31
Subject: [Mono-winforms-list] newbie questions trying to get winforms 
working


>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/
>
>
>_______________________________________________
>Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
>http://lists.ximian.com/mailman/listinfo/mono-winforms-list
>
> 



More information about the Mono-winforms-list mailing list