Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 5, 2025

This PR documents the breaking change where WebHostBuilder, IWebHost, and WebHost are marked as obsolete in .NET 10 RC 1, as announced in aspnet/Announcements#526.

The deprecation introduces two new diagnostic warnings:

  • ASPDEPR004 for WebHostBuilder usage
  • ASPDEPR008 for IWebHost and WebHost usage

These APIs are being deprecated in favor of HostBuilder (introduced in ASP.NET Core 3.0) and WebApplicationBuilder (introduced in ASP.NET Core 6.0), which are where future investments will occur.

Changes Made

  • Created docs/core/compatibility/aspnet-core/10/webhostbuilder-deprecated.md with comprehensive documentation including:

    • Diagnostic IDs and warning messages
    • Migration examples for both HostBuilder and WebApplicationBuilder approaches
    • Links to relevant migration guides and documentation
    • Proper xref links to affected APIs
  • Updated docs/core/compatibility/toc.yml to include the new breaking change document

  • Updated docs/core/compatibility/10.0.md to add the breaking change entry to the ASP.NET Core table

The documentation follows .NET docs standards with proper AI-usage disclosure and passes all markdown linting validation.

Fixes #48259.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.


Internal previews

📄 File 🔗 Preview link
docs/core/compatibility/10.0.md Breaking changes in .NET 10
docs/core/compatibility/aspnet-core/10/webhostbuilder-deprecated.md WebHostBuilder, IWebHost, and WebHost are obsolete
docs/core/compatibility/toc.yml docs/core/compatibility/toc

@Copilot Copilot AI changed the title [WIP] Document https://github.com/aspnet/Announcements/issues/526 Document WebHostBuilder, IWebHost, and WebHost deprecation breaking change Sep 5, 2025
@Copilot Copilot AI requested a review from gewarren September 5, 2025 16:39
Copilot finished work on behalf of gewarren September 5, 2025 16:39
@gewarren gewarren marked this pull request as ready for review September 5, 2025 23:29
@gewarren gewarren requested a review from a team as a code owner September 5, 2025 23:29
@gewarren gewarren merged commit ff543ed into main Sep 9, 2025
10 checks passed
@gewarren gewarren deleted the copilot/fix-48259 branch September 9, 2025 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document https://github.com/aspnet/Announcements/issues/526
4 participants