I currently have a .NET Maui desktop project using a SQLite database. The database file is stored within that project. In the same VS solution I have a WorkerService project that is retrieving data from that file. I have been able to create and test this using the absolute path of the database file but haven't been able to set the path up to be found correctly when publishing. I am not sure if I should be attempting to relocate the file or find a better/correct way to set the relative path. The end goal is to publish the MauiProject msix and include the worker service. Below is the current solution and db file location.
ADIOrderTracker\ADIOrderTracker\ADIOrderTracker.db
string baseDir = "ADIOrderTracker";
string mauiProjectDirectory = Path.Combine(baseDir, @"ADIOrderTracker\ADIOrderTracker.db");
string databaseFilePath = Path.GetFullPath(mauiProjectDirectory);
_logger.LogInformation($"Database file path: {databaseFilePath}");
string connectionString = $"Data Source={databaseFilePath};";
