简体   繁体   中英

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!

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM