[Mono-winforms-list] Port winform .NET 4.0 app to Mac OSX
andyhume32 at yahoo.co.uk
Tue Sep 20 14:37:35 EDT 2011
> -----Original Message-----
> From: mono-winforms-list-bounces at lists.ximian.com
> [mailto:mono-winforms-list-bounces at lists.ximian.com] On Behalf Of GCHQ
> Sent: 19 September 2011 15:39
> To: mono-winforms-list at lists.ximian.com
> Subject: [Mono-winforms-list] Port winform .NET 4.0 app to Mac OSX
> Hi there
> I have a winform .NET 4.0 application that I would like to
> port to Mac OSX.
> The app is deployed to windows using ClickOnce, uses a
> backend WebService as it's data source and quite extensive
> use of the built in WebBrowser. The project contains about 200k LOC
> 1. Is it possible to port an existing winform application to OSX?
Yup, and it **might** even run without re-compilation. There is no need
to compile the program on the Mac, just compile it on Windows and run it
on the Mac. Obviously making changes to the source to run well on the
> 2. If so would WebService, WebBrowser and other native
> Windows items cause a problem?
As Stifu supported WebBrowser is likely a problem. If you use native
component (DLLs, COM, ActiveX etc) then that'll be a problem too. Use
the MoMA tool to do an initial analysis -- see below.
> 3. Is there a step by step guide available?
My step 1 would be, install the Mono runtime environment on your
*Windows PC* and run the apps there. That will find any general Mono
problems as separate from any Unix/Mac problems. Once the app(s) runs
there then try it/them on Mac/Linux/etc.
There is also the MoMA tool which will do static analysis of your
program to see what APIs aren'tsupported on Mono.
For lots of documentation see http://www.mono-project.com/Start See for
> I did try opening one of our own smaller in-house utilities (also uses
> WebService) in Mono, but it throws a build error when run
> error RG0000: Type System.Drawing.Point, System.Drawing,
> Version=184.108.40.206, Culture=neutral,
> PublicKeyToken=b03f5f7f11d50a3a in the data at line 120,
> position 4 cannot be located. Line 122, position 5./
> - but runs without any problem in VS2010.
So this is loading your application project in the MonoDevelop IDE? If
so see above. Just run the .exe -- that you built on Windows -- on the
Mac and see what occurs. Run as "mono --debug myApp.exe" to see the
logging from Mono. :-)
More information about the Mono-winforms-list