Search code examples
uwpdesktop-bridge

Desktop Bridge SQLite


I've packaged my WinForms app with Desktop Bridge, but running the app fails with a Unhanadled exception.. "Unable to open database. Connection string "Data Source="Test.db";

In my WinForms app the db is located in the bin/x86/debug folder. It can't find my database.

What do I modify in the Winforms app to make it Microsoft Store/UWP runnable?


Solution

  • Use the following API for the Storagefolder:

    https://learn.microsoft.com/en-us/windows/uwp/get-started/fileio-learning-track

    with in your winforms application for file storage of the SQL lite database.