Skip to content

[release/6.0] Microsoft.Extensions.Logging.Abstractions includes unnecessary dependencies #59161

@ViktorHofer

Description

@ViktorHofer

Microsoft.Extensions.Logging.Abstractions references System.Memory and System.Buffers packages on net6.0 even though those libraries are part the 6.0 shared framework:

<ItemGroup>
<PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
</ItemGroup>

These dependencies should be conditioned to not apply to the .NETCoreApp assets. Note that this is already fixed in main.
This regressed with the move from pkgprojs to the NuGet pack task as the pkgproj infrastructure stripped dependencies that weren't necessary at compile time.

Reported in #59158.

cc @pentp

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions