Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Deprecating WebHostBuilder, IWebHost, and WebHost #63480

Unanswered
BrennanConroy asked this question in General
Discussion options

Discussion for announcement aspnet/Announcements#526

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

Why not deprecate HostBuilder as well? Don't you want everyone to move to the new HostApplicationBuilder-based API?

I don't see a point in maintaining anything other than the new HostApplicationBuilder approach. It is superior to the previous method in every way. Having both available is quite confusing.

You must be logged in to vote
3 replies
Comment options

FWIW, I would have had to refactor a lot more tests in some projects if that had been deprecated too 😅

Comment options

The new interface IHostApplicationBuilder exists in .NET 9 only so it's tough to deprecate HostBuilder and IHostBuilder because many people have never used IHostApplicationBuilder. Going forward though we'll recommand HostApplicationBuilder and IHostApplicationBuilder

Comment options

Fair enough. Thanks @davidfowl .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /