WARNING: LONG AND MOSTLY POINTLESS RANT AHEAD. DO NOT READ IF YOU DON'T WANT TO WASTE YOUR TIME.
I love Mono as a concept but every time I try to do something with it, it just doesn't work.
For a long time Mono's packages for Ubuntu were not up to date. So Mono would release 3.0, 3.1 etc with must-have improvements and bug-fixes but the latest packages available were for 2.x. The recommended work-around was to build from source. I did this about a year ago so I don't remember all the details but this was a small nightmare of its own, involving getting a bootstrap compiler that was not documented (or buried in the docs) and some other missing dependencies that triggered obscure compilation errors instead of just saying "you're missing dependency X".
Building monodevelop from source seemed impossible. I gave up after chasing gtk-sharp 2.0 (or something like that, I don't quite remember) everywhere, I could never find it (or manage to build it) for Mono 3.x.
Fast forward to present day, there are up-to-date packages, so there's no need to build from source. So I install the monodevelop package but upon launching it complains about some missing obscure type or assembly. "Probably a Mono version mismatch", I think, so I remove all mono-related packages (including monodevelop) and while I'm doing that I see that there's a cool repository with MonoDevelop 5 and Mono 3.4 ( http://askubuntu.com/a/407715/35816
) (the official packages are still at Mono 3.2.8 / MonoDevelop 4). So I install that and then find out that it doesn't install any build tools in the PATH and more importantly the F# add-in is not available for this version of MonoDevelop yet.
So back to removing everything and installing the official packages.
I open a solution in MonoDevelop. For whatever reason it marks a couple of projects in the solution as "not built in active solution" even though that's not the case when I open them in Visual Studio.
I hit "build all" and get this IDE error (not a compilation error, an IDE error):
System.NullReferenceException: Object reference not set to an instance of an object
Server stack trace:
at MonoDevelop.Ide.Gui.Pad..ctor (MonoDevelop.Ide.Gui.DefaultWorkbench workbench, MonoDevelop.Ide.Codons.PadCodon content) [0x00000] in <filename unknown>:0
I try again and it works (?) but with a compilation warning saying that it can't find FSharp.Core.dll, even though I've already installed the F# add-in.
I try installing the `fsharp` package, now when I open the solution in Monodevelop I get a lot of errors "Unsupported or unrecognized project". Re-install the F# add-in, re-open the solution, it can't find FSharp.Core and the strong-name key file, even though xbuild can compile everything just fine.
I remove the snk reference, and then find out that the solution is missing several projects. No warnings or hints whatsoever about this. Fine, I add the missing projects again and it compiles. But some of the tests fail, apparently Type.GetType() does not behave as in .NET, now I have to investigate how it differs and why and how to make it work in both .NET and Mono.
This isn't the first time I have issues with Mono breaking .NET compatibility (and not for nix-related reasons). In my very brief incursions into Mono, I've seen it not reading extension methods correctly ( https://github.com/mausch/Fuchu/commit/9bcf93bba9d8f634b745baa512b9129454e2b3f6 ) and having an incorrect behavior around Cultures ( https://twitter.com/mausch/status/477967161613631488 ). Sure a huge project like Mono having bugs is common, but this is *foundational
stuff that every project uses, not some niche library.
On Windows, I run this console application on Mono 3.2.3 and get:
Missing method .ctor in assembly xxx.exe, type Microsoft.FSharp.Core.EntryPointAttribute.
I have no idea what this means and googling the error doesn't say much.
I really want see Mono work, which makes this all the more frustrating, but it still seems to be awfully buggy everywhere and I'm not even using it in anger. Maybe I'm just used to Visual Studio/.NET's quirks so much that I don't see them any more. But at the very least, if you want to dabble in Mono, prepare to put in a lot of time towards just getting things to work as in .NET.
And please do not take this rant as a review of Mono in general, I know there are people that have been using it happily for years.