[Mono-list] Mono(Develop) crossplatform?

Jonathan Pryor jonpryor at vt.edu
Sun Mar 26 22:11:34 EST 2006

On Sun, 2006-03-26 at 14:54 -0800, Martin Olsson wrote:
> I keep reading that Mono creates binaries that run with no modifications 
> on any platform. If this is true, why does not MonoDevelop run on Windows?

Let's clarify that then.

You *can* create binaries with Mono that run without modifications on
any platform.  That need not be the case, if you use platform-specific
functionality (e.g. DllImports to KERNEL32.dll, or use of Gnome-specific
libraries, or...).

Similarly, you *can* create Java apps which run w/o modifications (until
you start using JNI, or vendor-specific add-ons).  You *can* create
cross-platform Perl apps, Python apps, and Ruby apps (again, until you
use a platform-specific library).

It always comes down to dependencies.  Many people will want
platform-specific functionality, as that frequently allows
platform-specific integration (e.g. a Cocoa# GUI will fit in much better
on Mac OS X than a Gtk# or System.Windows.Forms GUI, but Cocoa# isn't
portable to non-OS X platforms).

> so what guarantee do I have that I will not run into similar problems
> if I start a serious project using Mono?

When Java was first introduced, it was declared as "write once, run

Microsoft, showing some insight, said that Java was "write once,
test/debug everywhere."  This was principally because everyone's JVM was
different, thus requiring extensive testing to ensure that your
"portable" code ran correctly under all supported JVMs.

Mono and .NET are no different.  If you want to make sure that your code
runs under all of your supported platforms, TEST YOUR CODE UNDER ALL
SUPPORTED PLATFORMS.  The same would be true for Rotor, Portable.NET,
and even Microsoft's Compact Framework.  Each platform will have
different idiosyncrasies -- you'll need to test, in order to find them
and work around them.

"Write once/run everywhere" is a pipe dream, and likely always will be
(because *users* like platform integration, necessitating
platform-specific use; if it were up to the programmers, portable
libraries would be used everywhere and no platforms would be different,
as this is easier to deal with).

 - Jon

More information about the Mono-list mailing list