File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ namespace Microsoft.AspNetCore.Hosting;
2020
2121internal sealed class GenericWebHostBuilder : WebHostBuilderBase , ISupportsStartup
2222{
23- private const string _startupConfigName = "__UseStartup.StartupType " ;
23+ private const string _startupConfigName = "__UseStartup.StartupObject " ;
2424 private readonly object _startupKey = new object ( ) ;
2525
2626 private AggregateException ? _hostingStartupErrors ;
Original file line number Diff line number Diff line change @@ -1681,11 +1681,11 @@ public void Configure(IWebHostBuilder builder)
16811681 // This check is required because MVC still uses the
16821682 // IWebHostEnvironment instance before the container is baked
16831683#pragma warning disable CS0618 // Type or member is obsolete
1684- var heDescriptor = services . FirstOrDefault ( s => s . ServiceType == typeof ( IHostingEnvironment ) ) ;
1684+ var heDescriptor = services . LastOrDefault ( s => s . ServiceType == typeof ( IHostingEnvironment ) ) ;
16851685 Assert . NotNull ( heDescriptor ) ;
16861686 Assert . NotNull ( heDescriptor . ImplementationInstance ) ;
16871687#pragma warning restore CS0618 // Type or member is obsolete
1688- var wheDescriptor = services . FirstOrDefault ( s => s . ServiceType == typeof ( IWebHostEnvironment ) ) ;
1688+ var wheDescriptor = services . LastOrDefault ( s => s . ServiceType == typeof ( IWebHostEnvironment ) ) ;
16891689 Assert . NotNull ( wheDescriptor ) ;
16901690 Assert . NotNull ( wheDescriptor . ImplementationInstance ) ;
16911691 } )
You can’t perform that action at this time.
0 commit comments