Closed
Description
WebApplicationBuilder currently copies sources from its Configuration
property in a _hostBuilder.ConfigureHostConfiguration(
callback. This works well for sources that are configured by that point, but that means lower-level services like loggers that use the _hostBuilder
's configuration don't observe sources that are added are removed after the ConfigureHostConfiguration
runs.
As part of this, I think we should try to re-add app configuration during WebApplicationBuilder.Build()
so we can allow users to change the environment after constructing the WebApplicationBuilder but before actually building it. See WebApplicationFunctionalTests.EnvironmentSpecificLoggingConfigurationSectionPassedToLoggerByDefault() for one of the broken scenarios.
Activity
[-]Use a ChainedConfigurationSource to share sources between WebApplicationBuilder an inner host[/-][+]Use a ChainedConfigurationSource to share sources between WebApplicationBuilder and inner host[/+]ghost commentedon Jun 2, 2021
Thanks for contacting us.
We're moving this issue to the
Next sprint planning
milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s).If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues.
To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.