sqlite.cs could not find sqlite3 and community sqlite.cs could not find sqlite3 and community sqlite sqlite

sqlite.cs could not find sqlite3 and community


I think you forgot to add USE_WP8_NATIVE_SQLITE to your conditional compilation symbol.

#if USE_CSHARP_SQLITEusing Sqlite3 = Community.CsharpSqlite.Sqlite3;using Sqlite3DatabaseHandle = Community.CsharpSqlite.Sqlite3.sqlite3;using Sqlite3Statement = Community.CsharpSqlite.Sqlite3.Vdbe;#elif USE_WP8_NATIVE_SQLITEusing Sqlite3 = Sqlite.Sqlite3;using Sqlite3DatabaseHandle = Sqlite.Database;using Sqlite3Statement = Sqlite.Statement;


I tested it, seems to be a bit problem with Windows phone 8 and Sqlite.

First thing to solve your problem is, to add the "Community.Csharpsqlite.WP" reference to the app. To do this, open the Nuget package manager and type "csharpsqlite" and install the resultant nuget package in your app. This resolves both the above issues you mentioned in your question. but agian, raises another problem. There are some incompatible methods in between "Community.Csharpsqlite.WP" and SQLite.cs file from "sqlite-net". One solution for this is to manually modify the methods in SQLite.cs to resolve the incompatibilities.

Alternatively, if the above process doesn't work out for you, then use the process of WP7 sqlite as mentioned in the dotnetslackers link. Test this in a separate project and hopefully this should work.


I got it working on Windows Phone 8 without csharpsqlite.

Peterhuene created a wrapper for SQLite which you can get from GitHub. No csharpsqlite needed anymore. The readme section contains all information needed.

A detailed description of how to set it up can also be found here on CodeProject.