[Mono-list] Which version of Mono do I need for Linux?

Jonathan Pryor jonpryor at vt.edu
Wed Feb 17 14:35:10 EST 2010

On Tue, 2010-02-16 at 12:36 -0800, Chu wrote:
> Our product is written in .NET, using WinForms. The product needs to be
> deployed and be flexible enough to run on any version of Linux. Ideally,
> we'd like to deploy mono with our installation package. 

"Any version of Linux" is quite a requirement.

There are two fundamental ways to go about this:

1. Create distro-specific packages which have proper dependencies, and
don't bundle Mono with your app.  Things like the openSUSE Build Service
can help.

Pro: your packages are smaller, and you don't need to worry about
maintaining Mono and tracking bug/security fixes (as you'll be using the
distro-provided mono).

Con: you won't be maintaining Mono (and thus if/when they upgrade it
your app might break); not all platforms provide a system mono (RHEL).

2. Bundle mono and all dependencies with your app.  Assuming you're just
using WinForms, this will likely be (at minimum) mono, mcs, and
libgdiplus.  Install all into a custom prefix
(e.g. /opt/ComputerLabSolutions), and provide a shell script
(/opt/ComputerLabSolutions/bin/YourAppName) which sets LD_LIBRARY_PATH
and other relevant environment variables so that your mono & libraries
are used (and not the system-provided libraries).

Pro: Your "package" is self-contained, and less reliant on
distro-provided packages.

Con: The feasibility of this approach declines as your dependency list
increases.  Mono & libgdiplus?  Sure.  Gtk# and a custom GTK+?  Uh...

The real killer is dependencies wrt "any version of Linux," as "any
version of linux" will include distros that have an ancient libgdiplus
(assuming they have one at all), or an equally ancient GTK+ stack (if
you're writing a Gtk# app), and any number of other implicit and
explicit dependencies.

Have you considered just providing a VM image and using SUSE Studio to
build it?

 - Jon

More information about the Mono-list mailing list