-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Do not override content root with default #79242
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
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_CONTENTROOT
always gets ignored.The issue was customer reported. There is a workaround of using the
DOTNET_CONTENTROOT
or even justCONTENTROOT
environment variables instead, but theASPNETCORE_
environment variable prefix is common. I plan to backport this for .NET 7 servicing.This issue is caused by
HostApplicationBuilder
overriding the content root configuration passed in by ASP.NET Core'sWebApplicationBuilder
viaHostApplicationBuilderSettings.Configuration
with the CWD. This fix changes theHostApplicationBuilder
to only configure the default content root to be CWD if it has not already been configured manually.