修改子配置文件的相对路径
This commit is contained in:
parent
945fb993f5
commit
7bf096ddb1
@ -34,10 +34,12 @@ namespace FastGithub
|
||||
})
|
||||
.ConfigureAppConfiguration(c =>
|
||||
{
|
||||
if (Directory.Exists("appsettings") == true)
|
||||
const string APPSETTINGS = "appsettings";
|
||||
if (Directory.Exists(APPSETTINGS) == true)
|
||||
{
|
||||
foreach (var jsonFile in Directory.GetFiles("appsettings", "appsettings.*.json"))
|
||||
foreach (var file in Directory.GetFiles(APPSETTINGS, "appsettings.*.json"))
|
||||
{
|
||||
var jsonFile = Path.Combine(APPSETTINGS, Path.GetFileName(file));
|
||||
c.AddJsonFile(jsonFile, true, true);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user