dotnet / dotnet/aspnetcore

Decouple the Kestrel transport layer from Microsoft.AspNetCore.Hosting

Open
#11,479 7 comments 4 reactions 0 assignees View on GitHub
affected-very-few api-suggestion area-networking breaking-change enhancement severity-nice-to-have 🥌 Bedrock
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 6h
Merged PRs (30d)
290

Description

Both **Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets** and **Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv** depend on **Microsoft.AspNetCore.Hosting** because they expose extension methods on `IWebHostBuilder`, with the move to generic host and exposing the ability to create client connections from these transports (#10872), it's odd to have this dependency.

It seems like to preserve `UseSockets` and `UseLibuv`, we'll need to have extensions methods like these somewhere, either on the `IWebHostBuilder` or on the `IServiceCollection`. It seems like we'll need to introduce new packages to that have just the code without the extensions and another one that has the wire up code (much like we have the kestrel meta package today).

cc @shirhatti @anurse

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.