I am creating a WPF project using .net Core 3.0, and I am having trouble adding the item appsettings.json
file to my project which is to be used to store my DB connection string.
I would normally have done inside the app.config
, but this has now been removed from .net Core.
Everywhere mentions using appsettings.json
as a replacement, and that it has to be maunally added & initialised in the OnStartUp()
function using an instance of IConfiguration
, and there after using Dependency Injection to pass in the config class into the project.
But my issue is that can only add the appsettings.json
item on asp.net Core projects? not my WPF solution.
I do apologies if I'm missing something very obvious (which I probably am), I just can't seem to find any solutions.