Skip to content

Microsoft.Extensions.Http depends on concrete logging and dependency injection packages #44349

@antoinebj

Description

@antoinebj

Hi,

I was surprised when adding Microsoft.Extensions.Http that I had to accept the licenses for Microsoft.Extensions.DependencyInjection and Microsoft.Extensions.Logging instead of just their abstraction counterparts.

IMHO it's counter-intuitive that an HTTP client factory would need access to concrete logging and not its abstractions, and that logging would need access to the concrete DI container implementation package, and not just the abstractions.
That strong coupling appears to defeat the purpose of having abstraction packages.

Unfortunately I don't have time right now to delve inside the source code, can someone explain why it has to be like that? Or whether it can be improved in the future?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions