Skip to content

Rename ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder - #67917

Merged
Youssef1313 merged 5 commits into
mainfrom
copilot/rename-configurehostapplicationbuilder
Jul 21, 2026
Merged

Rename ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder#67917
Youssef1313 merged 5 commits into
mainfrom
copilot/rename-configurehostapplicationbuilder

Conversation

Copilot AI commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

API-approved rename of ConfigureHostApplicationBuilderConfigureWebApplicationBuilder on WebApplicationFactory<TEntryPoint> to avoid confusion with Host.CreateApplicationBuilder/Host.CreateDefaultBuilder scenarios.

Description

  • WebApplicationFactory.cs: Renamed protected virtual method and private reflection helper; updated all call sites and nameof references
  • Resources.resx: Renamed resource key ConfigureHostApplicationBuilderNotSupportedConfigureWebApplicationBuilderNotSupported; updated error message text
  • PublicAPI.Unshipped.txt: Updated public API surface entry
  • TestingInfrastructureInheritanceTests.cs: Updated test fixture class and override references
-protected virtual void ConfigureHostApplicationBuilder(IHostApplicationBuilder hostApplicationBuilder);
+protected virtual void ConfigureWebApplicationBuilder(IHostApplicationBuilder hostApplicationBuilder);
  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a new feature or change, please open an issue to discuss the change or find an existing issue.

Co-authored-by: Youssef1313 <31348972+Youssef1313@users.noreply.github.com>
Copilot AI changed the title [WIP] Rename ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder Rename ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder Jul 20, 2026
Copilot AI requested a review from Youssef1313 July 20, 2026 17:36
@Youssef1313
Youssef1313 marked this pull request as ready for review July 20, 2026 18:51
@Youssef1313
Youssef1313 requested a review from a team as a code owner July 20, 2026 18:51
Copilot AI review requested due to automatic review settings July 20, 2026 18:51
Comment thread src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Renames the WebApplicationFactory<TEntryPoint> protected customization hook from ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder to better align with WebApplicationBuilder terminology and avoid confusion with generic host builder APIs.

Changes:

  • Renamed the protected virtual method to ConfigureWebApplicationBuilder and updated the internal override-detection helper and call sites.
  • Updated the corresponding resource key/message used for the unsupported-override exception.
  • Updated functional tests and PublicAPI tracking to reflect the rename.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Mvc/test/Mvc.FunctionalTests/TestingInfrastructureInheritanceTests.cs Updates test factory type/override usage and asserted exception message to the new method name.
src/Mvc/Mvc.Testing/src/WebApplicationFactory.cs Renames the customization hook and override detection, and updates exception resource usage accordingly.
src/Mvc/Mvc.Testing/src/Resources.resx Renames the resource key and updates message text to reference ConfigureWebApplicationBuilder.
src/Mvc/Mvc.Testing/src/PublicAPI.Unshipped.txt Updates the unshipped public API entry for the renamed protected virtual method.

Comment thread src/DefaultBuilder/src/WebApplicationBuilder.cs Outdated
@Youssef1313
Youssef1313 enabled auto-merge (squash) July 21, 2026 08:44
@Youssef1313
Youssef1313 merged commit bd8392e into main Jul 21, 2026
24 checks passed
@Youssef1313
Youssef1313 deleted the copilot/rename-configurehostapplicationbuilder branch July 21, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider renaming ConfigureHostApplicationBuilder to ConfigureWebApplicationBuilder

5 participants