Skip to content

Conversation

@akoeplinger
Copy link
Member

It was obsoleted in dotnet/aspnetcore#62785

Switch to new HostBuilder().ConfigureWebHost instead.

It was obsoleted in dotnet/aspnetcore#62785

Switch to `new HostBuilder().ConfigureWebHost` instead.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Aug 13, 2025
@akoeplinger akoeplinger marked this pull request as ready for review August 13, 2025 15:19
Copilot AI review requested due to automatic review settings August 13, 2025 15:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the WASM host and debug proxy components to use the modern ASP.NET Core hosting pattern instead of the obsolete WebHostBuilder. The changes replace direct WebHostBuilder instantiation with the newer HostBuilder().ConfigureWebHost() pattern to address API deprecation.

Key changes:

  • Migrated from WebHostBuilder to HostBuilder().ConfigureWebHost()
  • Updated return types from IWebHost to IHost throughout the affected APIs
  • Added necessary using Microsoft.Extensions.Hosting directives

Reviewed Changes

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

File Description
src/mono/wasm/host/WebServer.cs Updated WebServer startup to use HostBuilder pattern and changed return type to IHost
src/mono/wasm/host/DevServer/DevServer.cs Updated DevServer startup to use HostBuilder pattern and changed return type to IHost
src/mono/wasm/host/BrowserHost.cs Added hosting namespace and updated method signatures to use IHost
src/mono/browser/debugger/BrowserDebugHost/DebugProxyHost.cs Updated debug proxy host creation to use HostBuilder pattern

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@akoeplinger akoeplinger merged commit a693af3 into dotnet:main Aug 13, 2025
22 of 24 checks passed
@akoeplinger akoeplinger deleted the webhostbuilder branch August 13, 2025 19:03
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants