How to connect to sqlite database from a Windows Runtime component that is designed to perform background tasks

I am having problems connecting to the sqlite database from the Windows Runtime component, which is designed to perform background tasks. I include all the dlls needed just as I added for the main project. But that does not work. Shows about 200 errors. I followed this post: https://github.com/praeclarum/sqlite-net/issues/104
But still I get errors .. 2 errors like this:

Error 2 The Windows Runtime class "SQLite.SQLiteException" has an invalid base type of "System.Exception". Exporting custom exception types is not allowed. D: \ MCM-22-Jan-2013 \ CCM \ TileBackground \ SQLite.cs 46 15 TileBackground

Error 92 The type "SQLite.TableMapping.Column" is a nested type. Nested types cannot be exported to Windows Runtime. D: \ MCM-22-Jan-2013 \ CCM \ TileBackground \ SQLite.cs 1390 16 TileBackground

+5
source share
2 answers

Today I ran into this problem and using https://github.com/praeclarum/sqlite-net/issues/104 I can solve it. Basically you have 2 things to do after installing sqlite-net nuget.

  • You need to change all publicclass definitions (5th column) to internal, for SQLite.cs and SQLiteAsync.cs
  • You need to change the namespace SQLiteto any namespace that your C # project uses.

, #/ Windows .

+4

Sqlite . sqlite-net DLL- Windows Store. , sqlite db, DLL.

, , () , . , Sqlite-net, .

-1

All Articles