So ... I'm having this .net core .exe console app which ... runs a server S1.
I'd like to start the server along with another app, let's say a console C1 (console, web, could be anything). Got some help to do it using a simpe example run external .exe app, yep, but when I apply the same approach to my project, it turns out it can't find the path to the db?
Below the exception I get
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware An unhandled exception has occurred while executing the request. System.ArgumentNullException: Value cannot be null. (Parameter 'path') at Se.Cae.Application.EntityFrameworkCore.Sqlite.ApplicationDataSource..ctor(String path, SecureString password, IDataMigration migrationSvc, IDataEncryption encryptionSvc, IDataIntegrity dataIntegritySvc) at Se.Cae.Application.EntityFrameworkCore.Sqlite.ApplicationDataSource..ctor(String path, IDataMigration migrationSvc, IDataEncryption encryptionSvc, IDataIntegrity dataIntegritySvc)
Got a tip from a friend, a temporary workaround: move your appsettings.json, where the connection string of your db is configured, to the bin folder of C1.
And yeah, it works, but ... it's not a clean solution, I'd have to put the file manually in the bin folder.
Which makes me wonder, is there a trick which can makes my standalone app launch correctly (including the db) without having to "cheat" :)
Thank you