Steve Macdonald
Steve Macdonald

Reputation: 1785

Xamarin + SQLite.Net on Windows?

I've developed a small prototype in Xamarin Studio on a Mac. It uses SQLite.Net.

When I opened it in Xamarin Studio for Windows it of course couldn't find the sqlite3.dll. I placed a copy of this DLL into the bin/debug folder and now it works in Xamarin Studio.

When I tried opening the solution in VS.Net 2013 at first I get a PInvokeStackImbalance exception (which apparently means calling convention is wrong). When I suppress that it does run in VS.Net, but EXTREMELY slowly.

There seems to be no documentation that I can find that explains how to configure sqlite on x64 Windows, .Net 4.5, Visual Studio so that it will work with SQLite.Net.

Any help as usual much appreciated!

Upvotes: 1

Views: 305

Answers (1)

SKall
SKall

Reputation: 5234

Look at ServiceStack.OrmLite, it has explanation and more info on the different types of SQLite DLL's. On top of that, ServiceStack also has OrmLite support (SQLite) for Android and iOS. If you with that route you can easily then replace the database provider in your code in case SQLite doesn't cut it anymore.

https://github.com/ServiceStack/ServiceStack.OrmLite

V3 branch is FOSS licensed.

Upvotes: 1

Related Questions