explicity specify optional and reload parameters

This commit is contained in:
Shaun Walker 2023-02-24 14:21:03 -05:00
parent f2df8e96db
commit 4913fab0b3
2 changed files with 2 additions and 2 deletions

View File

@ -95,7 +95,7 @@ namespace Oqtane.Repository
// anti-pattern used to reference config service in base class without causing breaking change // anti-pattern used to reference config service in base class without causing breaking change
_config = new ConfigurationBuilder() _config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory()) .SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json") .AddJsonFile("appsettings.json", false, false)
.Build(); .Build();
} }
} }

View File

@ -31,7 +31,7 @@ namespace Oqtane
{ {
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.SetBasePath(env.ContentRootPath) .SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) .AddJsonFile("appsettings.json", false, true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true); .AddJsonFile($"appsettings.{env.EnvironmentName}.json", true, true);
Configuration = builder.Build(); Configuration = builder.Build();