How to include SQLite database with Winforms project and App Center release?

  • Thread starter Thread starter hudson4351
  • Start date Start date
H

hudson4351

Guest
I have a Winforms desktop app written in C# using Visual Studio 2019 and have successfully setup my Azure DevOps pipeline to build and distribute my app to the App Center. The app creates and edits/updates local SQLite database files, but I would like to include a couple of sample databases that already contain valid data so the users can demo the app's other features without having to first create and populate their own databases.

How can I include these SQLite db files in my release? I'm not seeing a way in Visual Studio to add an SQLite project to my solution, even though I do already have the System.Data.SQLite.Core package installed with my solution. Based on my searching I've come across terms such as "content files" and "assets" in relation to Visual Studio, but these were from threads that were several years old and I'm not seeing those terms anywhere in Visual Studio 2019.

Would I be better off just writing code to generate the sample databases with all the sample data and then connecting that code to a GUI menu option? That would also allow the contents of the sample databases to be version controlled, as I'm assuming there's no way to diff an included binary DB against previous versions.

Continue reading...
 
Back
Top