8

Official Mono project website says that Mono works successfully on Windows, Linux and Mac OS X. Is that true?
I want to build applications which work at least on Windows and Linux. Is it possible with Mono?

P.S. I know that similar topics already exist (e.g. Cross platform .Net?), but they may be outdated.

Community
  • 1
  • 1
Sergey
  • 47,222
  • 25
  • 87
  • 129
  • 5
    As a general rule, something that sets out to be platform independant will get *better* not worse, so even if you find out of date information, you should be able to assume that it will still be *atleast* as good as that information says it is. – Matthew Scharley Oct 20 '09 at 11:06
  • 1
    check out this link .. some interesting discusson on similar topic.. http://stackoverflow.com/questions/751648/whats-the-point-of-mono-on-windows.. – RameshVel Oct 20 '09 at 11:20
  • 1
    We do that for a living with our product... – pablo Nov 04 '10 at 23:50

7 Answers7

10

Yes it is possible.

It generally works quite well, but I don't think there are any large/medium scale applications on Mono. There are several other apps you may want to have a browse through.

As Mono is a subset of the real thing (.NET), to maintain the best compatibility, you may have to develop in a Mono supported platform (e.g. Linux), then once it works there you can pretty much be certain that it will work on .NET. I'm saying this because although highly compatible with .NET, Mono is not as many people think fully compatible with the entire .NET stack and has other limitations too.

I have done development on it and stumbled across several of those. I hope your project does not have as many .NET dependencies as mine.

Community
  • 1
  • 1
NT_
  • 2,660
  • 23
  • 25
  • Yes, there are serious applications that are written using Mono. A number of the programs that you get with the GNOME desktop are writting using Mono. – Jesper Oct 20 '09 at 11:20
  • 1
    Monodevelop (IDE) is fairly large, and runs on Windows, Mac, and Linux. And, as I understand, they're working on getting Banshee (Media Player) to run on Windows. – sgwill Oct 20 '09 at 11:24
  • How are Second Life scripting language or Wikipedia search implementation not large scale applications? Yes, they do run on Mono. – skolima Oct 26 '09 at 13:52
4

It sure is. Mono will work across all three platforms, but when you say "building an application" you need to be aware that not all the .net namespaces have been ported across to Mono. They have placed a heavy focus on porting the "web bits" across so you shouldn't have too much trouble writing a web application that will work cross platform, but if you're looking to write a client application, you might need to check out the moonlight project which is a silverlight implementation for Linux.

lomaxx
  • 113,627
  • 57
  • 144
  • 179
  • 1
    I'm not sure the OP is talking about Silverlight/Moonlight/Web applications, but desktop applications. Desktop applications should easy to do cross-platform. "building an application" does not necessarily mean Silverlight/Moonlight/WPF, but can also be classic Forms. – Thorsten Dittmar Oct 20 '09 at 11:07
  • 2
    Excuse me, but what does Silverlight has to do with client applications? I thought this was somekind of Flash-Clone? Also, the System.Windows.Forms Namespace is completely ported, and there are also the GTK# Bindings since a long time. – Bobby Oct 20 '09 at 11:09
  • I completely agree, what I was getting at was that you can't just expect a WPF application to work on Linux, and even within the forms space there are some quirks between the Win32API bindings in .net and the GDK# binding on Linux, whereas these problems don't tend to exist so much in a web app. – lomaxx Oct 20 '09 at 11:10
  • Well, Sergey was talking about Mono Applications...so I think he wants to use also Mono on Windows, and not switching between Mono and .NET depending on the platform. And within Mono there shouldn't be any platform-specific...arrr...needs? – Bobby Oct 20 '09 at 11:47
  • 1
    @Bobby Silverlight has similarities to Flash but is much more targeted at producing line-of-business applications. It is entirely feasible to produce client desktop applications in Silverlight with version 3. – Alan B Oct 20 '09 at 12:34
2

I haven't done much in Mono yet, but it works really well. I'd suggest you develop under Linux. Then you can be very sure it works on Windows too (as long as you don't do stupid things like hardcoding paths, etc.).

Sinan Ünür
  • 116,958
  • 15
  • 196
  • 339
Thorsten Dittmar
  • 55,956
  • 8
  • 91
  • 139
  • You haven't done much but it works really good for the very few things you've done? How is that useful? – NT_ Oct 20 '09 at 11:11
  • 1
    In that it shows that even though I've not developed a mega-project I felt "home" in Mono instantly. I didn't say anything like "I've never seen it, but yes, it's 100% compatible" - so if not much, there's at least little value in my reply. – Thorsten Dittmar Oct 20 '09 at 12:12
1

It is cross-platform, just don't make the mistake of developing on Windows and using .NET libraries that are not implemented in Mono. For example Mono doesn't support WebParts even though .NET does.

Gergely Orosz
  • 6,475
  • 4
  • 47
  • 59
1

Mono works very well for creating WinForms applications that work on Windows and Linux. You can also use GTK if you prefer (broadly speaking I find WinForm UI's look slightly better under Windows, GTK interfaces look slightly better under Linux though depending on your app there may be little to know difference).

The Web Services implementation is also excellent (better than Microsoft's implementation in IIS, in fact) and works cross platform on both Windows, Linux and Mac OS.

However, if this is the road you want to go down you will have to build your project with Mono in mind. .NET projects created in Visual Studio will likely not run under Mono without (possibly significant) modification as not all .NET libraries are implemented - however Mono code will work just fine in Visual Studio (assuming they don't invoke any Mono specific libraries - but it's clear when your doing that as they are in the Mono.* namespace.).

Mono command line applications work just fine in Mac OS too, but the WinForms implementation on Mac OS is limited so if Mac OS is a consideration you are better off creating a native GUI in XCode and wiring it up to a C# backend as (unlike on Windows and Linux) Mono's WinForms implementation on Mac OS is not production quality.

I strongly recommend you check out Delphi Prism if you you are interested in creating cross platform (Win/Linux/Mac OS) apps in Visual Studio. There are other options (MonoDevelop IDE, Eclipse, TextMate) but it's easy to get to grips with, although not free.

Note: Contrary to what the name may suggest Delphi Prism allows you to write Mono apps in C#, not just using Delphi. It also makes wiring up Mono apps to Mac OS GUI's easier, but porting to Mac OS still requires a fair bit of extra effort (but not nearly as much as porting to ObjC!).

Lastly, this is isn't what you asked, but may be of interested to you: You could also consider using something like REALBasic to create the GUI and invoke bundled apps in Mono in the background (depending on what sort of app you are working on, and if you can't stomach using Basic in RB).

Iain Collins
  • 6,774
  • 3
  • 43
  • 43
0

Yes.

Of course it depends on what you are developing, and how you develop and test it. It may sound obvious, but any multi-platform app needs to be tested on each platform you need to support.

FWIW I created a NAnt-based Subversion admin tool that runs on Linux and Windows using Mono or Microsoft.NET interchangeably. Although I use it mainly on Windows, it works just as well on Linux.

You do also have to pay more attention to the finer details, like always using Environment.NewLine and Path.Combine, but that's a good thing!

si618
  • 16,580
  • 12
  • 67
  • 84
0

Sort of, but not so much. Please note that according to the mono-project site "other" Linux platforms are "unsupported" http://www.mono-project.com/Other_Downloads.

JavaScript and HTML5 is more cross platform than anything else out there. Yes, you can use JavaScript to develop games (Unity3D) and web server apps (Node.js) and mobile apps (Appcelerator, et al)

My best advice is, stop looking for a silver bullet. By the time you find it, it will be something else.

Michael M
  • 8,185
  • 2
  • 35
  • 51