views:

407

answers:

4

Mono claims to be compatible with .NET.

Have you tried it?

Can you share any tips or guidelines for making a running .NET application compatible with mono?

+5  A: 

Might be MoMA helps you

Peter
As I understand, this tool is to check AFTER code, I wish for guidelines BEFORE writting code. Thanks!
FerranB
+3  A: 

Basically, unit test like crazy! I support both mono and C# on a pet project (protobuf-net), and getting it to even compile on the range of different platforms was fun (I support mono, CF, Silverlight, etc). There are a number of compiler bugs in mono (even in the current release), in particular relating to generics - which mean you might need to use slightly different code to get it to compile in all flavors.

Then you need to think about which framework features you need. Avoid anything like WPF/WCF/WF, for example. But if you stick to core 2.0 features you are generally OK. There are still a lot of places where mono throws NotImplementedException, though. In one recent case, there were two ways of doing something: the "old" way worked on mono but was [Obsolete] in MS; the "new" version worked on MS, but was NotImplementedException on mono. Fun!

Marc Gravell
The best thing about Mono in the case of your NotImplementedException is that, being open source, you're free to go in an implement it yourself.
Erik Forbes
+4  A: 

See these documents for in-depth answers:

David Schmitt
A: 

Two things to keep in mind:

  • Don't try anything fancy.

  • Don't expect it to work under Mono first try

Mono is really good at the things that you do every day, like manipulating strings and displaying web pages. It's really bad at things that need to use the little hidden corners of the .NET runtime library. Crypto, for instance is still implemented at 1.1, and even some of that doesn't actually work.

In short, Mono is not a silver bullet.

Jason Kester