Skip to content

Commit

Permalink
Made appsetings.ENVIRONMENT.json optional (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
NoExitTV authored Nov 30, 2020
1 parent 48ad820 commit 806c3ec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public static IHostBuilder CreateHostBuilder(string[] args) =>
configurationBuilder.SetBasePath(Environment.CurrentDirectory)
.AddJsonFile("host.json", optional: true, reloadOnChange: true)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", optional: false, reloadOnChange: true)
.AddJsonFile($"appsettings.{Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT") ?? "Production"}.json", optional: true, reloadOnChange: true)
.AddEnvironmentVariables();
var configuration = configurationBuilder.Build();
Expand Down

0 comments on commit 806c3ec

Please sign in to comment.