From 135524fb17e755c671f59b550fc477843e4fca5d Mon Sep 17 00:00:00 2001 From: Youssef Fahmy Date: Tue, 21 Jul 2026 07:21:57 +0200 Subject: [PATCH 1/2] Rename ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder --- aspnetcore/test/integration-tests.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aspnetcore/test/integration-tests.md b/aspnetcore/test/integration-tests.md index fba32f6560af..871ba6066382 100644 --- a/aspnetcore/test/integration-tests.md +++ b/aspnetcore/test/integration-tests.md @@ -228,7 +228,7 @@ There are various ways to supply test-specific configurations to the running web Using this approach, the configuration source added via `ConfigureAppConfiguration` is preserved, but it's only available after the web application is built. If you try to access the configuration before `WebApplicationBuilder.Build` is called, the configurations will not be available. -3. Starting in .NET 11 Preview 6, you can override a new `ConfigureHostApplicationBuilder` method as follows: +3. Starting in .NET 11 Preview 6, you can override a new `ConfigureWebApplicationBuilder` method as follows: ```csharp private static readonly KeyValuePair[] s_inMemorySettings = new KeyValuePair[] @@ -236,14 +236,14 @@ There are various ways to supply test-specific configurations to the running web new("TestConfigKey", "TestConfigValue"), }; - protected override void ConfigureHostApplicationBuilder(IHostApplicationBuilder hostApplicationBuilder) + protected override void ConfigureWebApplicationBuilder(IHostApplicationBuilder hostApplicationBuilder) { hostApplicationBuilder.Configuration.AddInMemoryCollection(s_inMemorySettings); - base.ConfigureHostApplicationBuilder(hostApplicationBuilder); + base.ConfigureWebApplicationBuilder(hostApplicationBuilder); } ``` - Using this approach, the configuration source added via `ConfigureHostApplicationBuilder` is preserved, and is also available immediately after `WebApplication.CreateBuilder` returns. + Using this approach, the configuration source added via `ConfigureWebApplicationBuilder` is preserved, and is also available immediately after `WebApplication.CreateBuilder` returns. ## Customize the client with WithWebHostBuilder From 04dfba065050bf4b4bf5a4676e9ed1133524a3b3 Mon Sep 17 00:00:00 2001 From: Youssef Fahmy Date: Tue, 21 Jul 2026 07:22:38 +0200 Subject: [PATCH 2/2] Refer to P7 --- aspnetcore/test/integration-tests.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aspnetcore/test/integration-tests.md b/aspnetcore/test/integration-tests.md index 871ba6066382..02c107ac2f45 100644 --- a/aspnetcore/test/integration-tests.md +++ b/aspnetcore/test/integration-tests.md @@ -228,7 +228,7 @@ There are various ways to supply test-specific configurations to the running web Using this approach, the configuration source added via `ConfigureAppConfiguration` is preserved, but it's only available after the web application is built. If you try to access the configuration before `WebApplicationBuilder.Build` is called, the configurations will not be available. -3. Starting in .NET 11 Preview 6, you can override a new `ConfigureWebApplicationBuilder` method as follows: +3. Starting in .NET 11 Preview 7, you can override a new `ConfigureWebApplicationBuilder` method as follows: ```csharp private static readonly KeyValuePair[] s_inMemorySettings = new KeyValuePair[]