Merged
Conversation
Remove long-deprecated `WebHost` usage and instead use `Host`.
There was a problem hiding this comment.
Pull Request Overview
Modernizes ASP.NET Core hosting by replacing deprecated WebHost with the current Host pattern across test websites and CLI tools.
- Updates from
WebHost.CreateDefaultBuilder()toHost.CreateDefaultBuilder().ConfigureWebHostDefaults() - Standardizes method names from various patterns to
CreateHostBuilder - Removes unnecessary
Microsoft.AspNetCoreusing statements
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/WebSites/TestFirst/Program.cs | Updates hosting pattern and renames method from CreateWebHostBuilder to CreateHostBuilder |
| test/WebSites/ReDoc/Program.cs | Updates hosting pattern and renames method from BuildWebHost to CreateHostBuilder |
| test/WebSites/ConfigFromFile/Program.cs | Updates hosting pattern and renames method from BuildWebHost to CreateHostBuilder |
| test/WebSites/CliExample/Program.cs | Updates hosting pattern and renames method from BuildWebHost to CreateHostBuilder |
| src/Swashbuckle.AspNetCore.Cli/Program.cs | Updates hosting pattern in CLI service provider creation |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3517 +/- ##
=======================================
Coverage 94.28% 94.28%
=======================================
Files 110 110
Lines 3816 3816
Branches 722 722
=======================================
Hits 3598 3598
Misses 218 218
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This was referenced Aug 27, 2025
Closed
Merged
Closed
This was referenced Feb 18, 2026
Closed
Open
Open
Open
Open
Open
Open
Open
Open
Open
Open
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove long-deprecated
WebHostusage and instead useHost.Flushed out by trying to use
WebApplicationFactory<T>for Redoc with #3516.