2

We are using Sqlite for UWP Windows 10 to store local data on our app, it seems to work fine in Windows 10 PC, but the code throws an exception while creating a new SQL connection object in Windows Mobile. Please find the screen shot for more details.

This is the call where we tend to get the exception.

conn = new  SQLite.Net.SQLiteConnection(new SQLite.Net.Platform.WinRT.SQLitePlatformWinRT(), path);

Click here to download

Kindly request you to help on the fix.

Laith
  • 6,071
  • 1
  • 33
  • 60

1 Answers1

1

According to your code snippet, you are using the SQLite.Net-PCL Nuget package. To run it on the mobile or emulator you may need to add the "Visual C++ 2015 Runtime" package to the reference of your project.

enter image description here

On my side, add this reference the error will gone. More details please reference the note part of the SQLite.Net-PCL on GitHub, and this similar thread.

Community
  • 1
  • 1
Sunteen Wu
  • 10,509
  • 1
  • 10
  • 21