Skip to content

Connections.Abstractions broken with non-6.0 ASP.NETCore AppsΒ #38699

@BrennanConroy

Description

@BrennanConroy

In 6.0 we removed the Microsoft.AspNetCore.Http.Features package and added a new package (Microsoft.Extensions.Features) with some types moved from the old package to the new one. aspnet/Announcements#462

The problem is that Microsoft.AspNetCore.Http.Features is in the shared framework so when a reference to the new Microsoft.Extensions.Features package comes in you now have types defined in both Microsoft.Extensions.Features and Microsoft.AspNetCore.Http.Features.

You can easily repro this by creating a net461 or netcoreapp3.1 project and adding a reference to Microsoft.AspNetCore.Connections.Abstractions 6.0. A more likely scenario and where the real issue can be seen; I maintain a library that targets netstandard2.0 (so that it runs everywhere, and because all my dependencies like Microsoft.AspNetCore.Connections.Abstractions claim to run on netstandard2.0), and I see that 6.0 came out, I update my dependencies, maybe use some new features etc. unit test my library and ship it. Now someone comes along, tries to use my library in a net461, netcoreapp3.1, or net5.0 app and it breaks. My library now only works in net6.0 or a console app even though I wrote it so it runs everywhere.

Metadata

Metadata

Assignees

Labels

area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsbugThis issue describes a behavior which is not expected - a bug.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions