Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Should I use Mono on a real project?

Has anyone used Mono, the open source .NET implementation on a large or medium sized project? I'm wondering if it's ready for real world, production environments. Is it stable, fast, compatible, ... enough to use? Does it take a lot of effort to port projects to the Mono runtime, or is it really, really compatible enough to just take of and run already written code for Microsoft's runtime?

like image 386
John Smelty Avatar asked Oct 08 '08 07:10

John Smelty


People also ask

What is Mono used for?

Mono allows C# developers to write cross platform code targeting Windows, macOS, Linux, Android, and iOS.

Can Mono run .NET framework?

Yes, Mono can run applications developed with the Microsoft . NET Framework on UNIX.


1 Answers

I've used it for a number of internal and commercial projects with great success. My warnings:

  • Write lots of unit tests and make sure they ALL pass under Mono -- this will save you a lot of trouble.
  • Unless you absolutely have to, do NOT use their embedding API. It's damn easy to use, but it's ungodly easy to garbage collect valid memory or leak all of your memory.
  • Don't ever, ever, ever even come close to SVN and unless there's no choice, do not compile your own. Things change so often in SVN that it's highly likely you'll end up implementing something that doesn't work on a release version if your project is significantly large.
  • Don't try and figure out problems on your own for long, use the IRC channel. The people there are helpful and you'll save yourself days upon days -- don't make the same mistake I did.

Good luck!

Edit: The reason I say not to compile your own from source (release or SVN) is that it's easy to configure it differently than release binaries and hide bugs, for instance in the garbage collection.

Edit 2: Forgot to answer the second part to your question. In my case, I had no issues with porting code, but I wasn't using any MS-specific libraries (WinForms, ASP.NET, etc). If you're only using System.* stuff, you'll be fine; beyond that, you may run into issues. Mono 2.0 is quite solid, though.

like image 199
Serafina Brocious Avatar answered Oct 03 '22 07:10

Serafina Brocious