Open bartvanderwal opened 2 months ago
ChatGPT:
"It looks like the issue is that Directory.GetCurrentDirectory() is returning the path of the PriemCheckerLibrary project, and not the WebPriemChecker project where your appsettings.json file resides. To fix this, you need to explicitly tell Entity Framework Core to look in the WebPriemChecker project for the configuration files."
[...] Key Changes: SetBasePath is set to point to the WebPriemChecker project folder (../WebPriemChecker), where your appsettings.json file resides. The configuration now reads the correct settings file during design-time.
I get an error that on running the
dotnet ef migrations add ...
that - at design time - this EF tool cannot find theappsettings.json
file:I run it from the root PriemChecker' folder. The appsettings.json file is in the WebPriemChecker project (set as (EF) StartUp project). I have a Directory.Build.props file set like this:
Do I need an extra setting for the Directory.Props.build file to specify the folder the settings file is in, besides the startupProject setting that is already there?
This used to work I think.