Reputation: 1395
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?
Upvotes: 1
Views: 158
Reputation: 1
I was able to use sqlite without using the storage API. I used the entire path and saved the DB to public docs.
another solution is to use an installer framework like Advanced Installer.
They have a simple wizard that allows to simply declare where you want it without awkward code work-arounds.
Upvotes: 0
Reputation: 2051
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.
Upvotes: 2