peterhuene / sqlite-net-wp8

A C++/CX wrapper for SQLite functions that sqlite-net depends on. Can be used as an alternative to csharp-sqlite on Windows Phone 8. This library is released under the MIT license.
MIT License
74 stars 65 forks source link

Requested Windows Runtime type 'Sqlite.Sqlite3' #13

Closed shadrix closed 11 years ago

shadrix commented 11 years ago

I publish windows phone 8 app to store, and a lot of users not have trouble with him, but some time i get this error and i don't know why.

System.TypeLoadException: Requested Windows Runtime type 'Sqlite.Sqlite3' is not registered. ---> System.Runtime.InteropServices.COMException: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) --- End of inner exception stack trace --- at System.StubHelpers.StubHelpers.GetWinRTFactoryObject(IntPtr pCPCMD) at Sqlite.Sqlite3.sqlite3_open_v2(String filename, Database& db, Int32 flags, String zVfs) at SQLite.SQLiteConnection..ctor(String databasePath, SQLiteOpenFlags openFlags, Boolean storeDateTimeAsTicks) at SQLite.SQLiteConnectionWithLock..ctor(SQLiteConnectionString connectionString) at SQLite.SQLiteConnectionPool.Entry..ctor(SQLiteConnectionString connectionString) at SQLite.SQLiteConnectionPool.GetConnection(SQLiteConnectionString connectionString) at SQLite.SQLiteAsyncConnection.Table[T]() at CraigsList.DataAccess.Providers.LocalDataProvider.d__2f.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at

Anybody know how fix this?!)

peterhuene commented 11 years ago

Are you sure the target architectures match between the project you're building and the Sqlite project? Make sure it targets ARM for the phone deployment and x86 for the emulator.

shadrix commented 11 years ago

I'm sure.

peterhuene commented 11 years ago

Is this being run on the emulator or on a device? Was Sqlite.dll renamed for deployment by chance?

peterhuene commented 11 years ago

Were you ever able to figure this issue out?