oysteinkrog/SQLite.Net-PCL — pull request #15 by jamesottaway (2014-04-15 05:47:46+00:00)
Title: Support SQLite via Mono

This PR adds support for SQLite under Mono without having to touch Xamarin.Android or Xamarin.iOS, via `Mono.Data.Sqlite`.

I'm successfully using the `SQLite.Net.Platform.Mono.dll` in the test project for a Xamarin app I'm building at work. I did this so I could use a plain Library Project for my tests, rather than having to turn it into a Xamarin platform-specific library project, and rather than having to boot up a Windows VM to run the unit tests using the `SQLite.Net.Platform.Win32` package.

I've run the following on my machine to confirm it works:

```
xbuild src/SQLite.Net.Platform.Mono/SQLite.Net.Platform.Mono.csproj /t:build
xbuild tests/SQLite.Net.Tests.Mono/SQLite.Net.Tests.Mono.csproj /t:build
mono $MONO_HOME/lib/mono/4.5/nunit-console.exe tests/SQLite.Net.Tests.Mono/bin/Debug/SQLite.Net.Tests.Mono.dll -exclude=Async
```

which gives me the following output:

```
NUnit version 2.4.8
Copyright (C) 2002-2007 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.

Runtime Environment -
OS Version: Unix 13.1.0.0
CLR Version: 4.0.30319.17020 ( 3.4.0 ((no/d4511ef Tue Mar 25 14:35:52 EDT 2014) )

Excluded categories: Async
......N.....N........................N...............................................
Tests run: 79, Failures: 0, Not run: 3, Time: 4.403 seconds
```

I'm running Mono v3.4.0, and `mono --version` gives me the following:

```
Mono JIT compiler version 3.4.0 ((no/d4511ef Tue Mar 25 14:35:52 EDT 2014)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
TLS: normal
SIGSEGV: altstack
Notification: kqueue
Architecture: x86
Disabled: none
Misc: softdebug
LLVM: yes(3.4svn-mono-(no/e656cac)
GC: sgen
```