jeudi 21 janvier 2016

Xamarin forms Sqlite WinPhone SQLitePCL.raw' threw an exception System.TypeInitializationException

Im trying to get a Xamarin forms sqlite up an runnig.

it works fine for Android and iOS, but for windows i get this error. I'm target the solutions for windows phone 8.1 and using Xamarin forms 1.5(I can't upgrade it)

I been following this sample from Xamarin

public class SQLite_WinPhone : ISQLite
    {
        public SQLite_WinPhone() { }
        protected override SQLite.SQLiteConnection GetConnection()
        {
            var sqliteFilename = "TODO.db3";
            string path = Path.Combine(ApplicationData.Current.LocalFolder.Path, sqliteFilename);
            // Create the connection
            var conn = new SQLite.SQLiteConnection(path);
            // Return the database connection
            return conn;
        }
    }

but so far no luck.

have any of you out there bump into this before?

Aucun commentaire:

Enregistrer un commentaire