The problem is that SQLiteAsyncConnection
implements a connection pool - the pooling has the side effect of keeping the db file open.
The only solution I can see is to use the synchronous version of the API. There is no pooling, and it allows you to close the db connection, and therefore close the file:
private bool CreateSchema()
{
using (var db = new SQLiteConnection(DbConstants.DbFileWithPath))
{
db.CreateTables(typeof (Doc), typeof(DocAttachment));
}
return true;
}