I'm trying to push to GitHub a Windows Forms VB.Net application which does CRUD operations on a local SQLite database file, but I realized the db3 file and System.Data.SQLite.dll are excluded from the push because the contents of bin/Debug folder where they're located are a part of the .gitignore policy template on Visual Studio, which absolutely makes sense.
I have tested the .exe file out of this Debug development folder and couldn't run the application either, throwing the exception: "Could not load file or assembly 'System.Data.SQLite, Version=1.0.116.0, Culture=neutral, PublicKeyToken=...' or one of its dependencies"
My Problem is all the guides I've checked to use a SQLite in a Windows Forms project place the database file in bin/Debug, I guess for the simplicity of the tutorial. So this way of referencing the SQLite db3 in bin/Debug works fine in my application:
Public dbFullPath As String = Application.StartupPath & "\\myDatabase.db3"
Public conStr As String = String.Format("Data Source = {0}; version = 3;", dbFullPath)
However, I don't know how to place the database at the same level of other project files like .vb Forms and the Resources folder and reference it so the app works and all the necessary files are pushed to my public repository.
I created an App_Data folder at project level and placed the database file inside and then tried to replace the path String from:
Public dbFullPath As String = Application.StartupPath & "\\myDatabase.db3"
to this:
Public dbFullPath As String = "App_Data\\myDatabase.db3"
But I'm unable to open the database in a different place other than bin/Debug.
Thank you very much for your help.