-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Do not override content root with default #79242
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @dotnet/area-extensions-hosting Issue DetailsThis fixes #78583 which is a regression between .NET 6 and .NET 7 where the impact is that The issue was customer reported. There is a workaround of using the This issue is caused by
|
src/libraries/Microsoft.Extensions.Hosting/src/HostApplicationBuilder.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/libraries/Microsoft.Extensions.Hosting/src/HostApplicationBuilder.cs
Outdated
Show resolved
Hide resolved
70d44ef to
6a0fbce
Compare
eerhardt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Sorry for the delay in approving.
|
/backport to release/7.0 |
|
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3650905524 |
This fixes #78583 which is a regression between .NET 6 and .NET 7 where the impact is that
ASPNETCORE_CONTENTROOTalways gets ignored.The issue was customer reported. There is a workaround of using the
DOTNET_CONTENTROOTor even justCONTENTROOTenvironment variables instead, but theASPNETCORE_environment variable prefix is common. I plan to backport this for .NET 7 servicing.This issue is caused by
HostApplicationBuilderoverriding the content root configuration passed in by ASP.NET Core'sWebApplicationBuilderviaHostApplicationBuilderSettings.Configurationwith the CWD. This fix changes theHostApplicationBuilderto only configure the default content root to be CWD if it has not already been configured manually.