Adding a json source file after configuration build

  • Thread starter Thread starter donvreug
  • Start date Start date
D

donvreug

Guest
I have built a configuration at startup using Microsoft.Extensions.Configuration from two files, i.e. appsettings.json and usersettings.json. I would like to be able to add a third json file to this configuration during runtime. Is this possible? Or would it be better to include a default third json file at startup and then somehow change its location during runtime? The third file is located somewhere on a network and its location may not be defined until it is required during runtime. If either option is possible it would be great to see some example code in C#. Thanks & regards.

Continue reading...
 
Back
Top