explicity specify optional and reload parameters
This commit is contained in:
parent
f2df8e96db
commit
4913fab0b3
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user