Closed mrlife closed 4 years ago
CreateHostBuilder(args).Build().Run();
The above line of code blocks forever so the second line of code that configures a new host with new configuration will never run.
PS: Are you trying to add new configuration sources? From the above, it looks like you're re-adding the defaults.
Yes, deleting the extra line CreateHostBuilder(args).Build().Run();
fixed the issue. It's not clear how it got added, but this issue can be fully deleted if you want.
I noticed that .AddJsonFile() is called automatically for
appsettings.json
andappsettings.{Environment}.json
. I'm not sure if this is new behavior, but I do know that callingAddJsonFile()
inConfigureAppConfiguration()
doesn't seem to have an affect anymore, but should it?I read through the docs but don't see where this should be done differently. Here is my
Main()
:Further technical details
dotnet --info