Simple.Data for Mono


I’ve got Simple.Data running on Mono 2.10.6. Most tests pass. YMMV. Download it here.

Ritalin version

Simple.Data on Mono is something that people have been asking about, and I’ve been meaning to sort out, pretty much since the project went from a proof-of-concept to an actual OSS product. One way or another I’ve never gotten round to it, but a couple of things have made it seem more relevant. Firstly, there are providers for lots of OSS databases now (MySQL, SQLite, PostgreSQL); secondly, a certain @fekberg has been very persistent in his status update requests, so I’ve taken the time this weekend to make it work.

The challenges

For the most part, I’ve been pleasantly surprised by how easy it’s been. I’ve found what I think is a bug in the Mono implementation of either dynamic or LINQ or the combination of the two, which I’m going to file with Xamarin once I’ve created a simple repro project. I’ve come up with a workaround involving old-school class-based IEnumerable/IEnumerator implementations, and the performance doesn’t seem to be affected, so that’s fine.

The hardest thing about the whole process is that MonoDevelop just isn’t Visual Studio 2010 + ReSharper. It’s not a bad IDE by any standards – I’d still take it over Eclipse any day – but I work day in, day out with VS and jumping into any other IDE just feels like somebody moved all the cheese. Add to that the fact that I’m running it under OSX, so even the standard Windows keyboard shortcuts don’t work, and it’s a bit like running in treacle. As I understand it, the Mono Tools for Visual Studio don’t support 2.10; Miguel de Icaza tells me that they’re working on some awesome new VS tooling, so I’m really looking forward to that.

The other big challenge was testing the ADO adapter against a real database. I only own the SQL Server and SQL Compact providers, so I really wanted to test with SQL Server to keep things simple and let me step-debug if necessary. I was expecting not to have fun with this, but it turned out fine. I run my Windows development environment on my MacBook using Parallels 7, so I set up the Host-Guest networking (easy) and opened inbound port 1433 in Windows Firewall (also easy) and that was it. There were a couple of failing tests, one calling a stored procedure with a DataTable and one involving a scalar function, but the rest just passed. I’m guessing that the majority of people who want to use Simple.Data on Mono will be using one of the OSS DB providers, so hopefully this won’t be a problem.


I don’t know what the Mono NuGet situation is, so I’ll be releasing Mono builds as tgz downloads from the GitHub project page. For the time being, there are differences between the Mono build of Simple.Data.SqlServer and the Microsoft .NET build, so if you want to use that provider, don’t use the NuGet version.

Right now, there’s a 0.11.4 build in the Downloads section which I hope works. However, I haven’t really exercised it to any great degree, so if you encounter any problems please raise an issue if you think it’s a bug, or ask on the mailing list if you aren’t sure.

If you are one of the developers of an adapter or provider, you might want to test against Mono. If, for any reason, that’s not an option, then let me know and I’ll try to find time to test it for you.

Going forward, I will support (in the OSS sense of the word) both Microsoft .NET and Mono for all releases.


  1. No offence mate, but you really need to learn how to write an article. Even the “TL;DR” is mainly nonsense to whoever stumbles across your post. What even *is* Simple.Data, *why* should we use it, in what *cases* should we use it at all/as opposed to competition?

    • I know some bloggers (even infrequent ones) like to kid themselves that their posts are “articles”, but I’m not one of them; it’s just a blog post. I’ve written many of them about Simple.Data over the last year or so, so excuse me if I don’t provide an in-depth explanation of what it is in each and every one just in case somebody can’t be bothered even to click the hyperlink in the TL;DR line which would take them to the project’s GitHub site where there’s a README, a Wiki and a further link to the documentation. You know what? I really don’t want somebody like that to “use it at all/as opposed to competition”. In fact, I expressly forbid you to use it.

      Thanks for stopping by and insulting me, though. It’s stuff like this that really makes all the effort involved in maintaining an OSS project worthwhile.

    • And BTW, putting “no offence mate” before being downright rude does not stop people from taking offence. It’s like saying “no nosebleed mate” before punching someone in the face.

      • @markrendle! As C# a beginner level developer, you can not imagine how much I (and may people like me) appreciate your effort on making this ‘Simple’ way of using almost all popular databases. Therefore, you can easily afford to ignore the *ignorance* and *stupidity* of some… maybe it’s his way of getting popular and making his profile and **blog/articles** reach more people…good effort noldorin!

  2. After finding out about Simple.Data I was pretty excited. When I saw you would also be supporting Mono, I was thrilled. Then I saw the first comment and I was like, “What!” As someone new to c#, it was very easy for me to both look up “TL;DR,” understand what you meant by it, and put it in context with the rest of your blog posts. So, I just wanted to say thanks for your development and blogging efforts, both of which are very cool.

  3. Hi Mark,
    I cloned your repo on github and tried to compile it under mono. Should it compile? I get a missing method on Assembly (which is missing in mono).
    Thanks, J

  4. Here is another database that is compatible with Mono:


  1. [...] Simple.Data for Mono – Mark Rendle has got his Simple.Data Dynamic Data Access library up and running under Mono, with most of the tests passing. The Mono release is available as a tgz download from the project’s GitHub Site. [...]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 3,742 other followers

%d bloggers like this: