Skip to content

Microsoft.Extensions.DependencyInjection package is missing a net5.0 configuration and doesn't exclude $(NetCoreAppCurrent) #48307

Closed

Description

@ViktorHofer

Also, did we intentionally ship a net5.0 asset for that package?

cc @maryamariyan @ericstj

Activity

  1. added this to the 6.0.0 milestone on Feb 15, 2021
  2. ghost added
    untriaged
    on Feb 15, 2021
  3. removed
    untriaged
    on Feb 15, 2021
  4. ViktorHofer commented on Feb 15, 2021

    @ViktorHofer
    MemberAuthor

    Also why does the package's nuspec list dependency groups for netcoreapp2.1 and netcoreapp3.0? Is this a packaging infra bug? cc @Anipik @ericstj

          <group targetFramework=".NETCoreApp2.1">
            <dependency id="Microsoft.Bcl.AsyncInterfaces" version="6.0.0-preview.1.21102.12" />
            <dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0-preview.1.21102.12" />
          </group>
          <group targetFramework=".NETCoreApp3.0">
            <dependency id="Microsoft.Extensions.DependencyInjection.Abstractions" version="6.0.0-preview.1.21102.12" />
          </group>
    
  5. ghost added
    in-pr
    on Feb 15, 2021
  6. ericstj commented on Feb 17, 2021

    @ericstj
    Member

    Those are projections of the netstandard dependencies, trimming inbox packages.

    .NETStandard 2.0
    Microsoft.Bcl.AsyncInterfaces (>= 5.0.0)
    Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)
    System.Threading.Tasks.Extensions (>= 4.5.4)

    .NETStandard 2.1
    Microsoft.Extensions.DependencyInjection.Abstractions (>= 5.0.0)

    So .NETCoreApp2.1 supports .netstandard2.0 and it has Threading.Task.Extensions inbox, so it gets a new group and that package is removed.

    .NETCoreApp3.0 needs to be copied from .NETStandard2.1 so that the newly created .NETCoreapp2.1 group doesn't take precedence.

    This is done by this task: https://github.com/dotnet/arcade/blob/master/src/Microsoft.DotNet.Build.Tasks.Packaging/src/CreateTrimDependencyGroups.cs

  7. ghost removed
    in-pr
    on Feb 18, 2021
  8. ViktorHofer commented on Feb 18, 2021

    @ViktorHofer
    MemberAuthor

    I didn't know about this packaging feature. Are we concerned that we won't have a similar mechanism with NuGet's pack task? I guess not as there's still conflict resolution which will remove the unnecessary reference during the build.

  9. ericstj commented on Feb 18, 2021

    @ericstj
    Member

    This optimization was much more important when we regularly referenced so many inbox packages (netcoreapp1.x, netstandard1.x). As part of the work when moving to NuGet pack folks should be closely looking at the diff of nuspecs and understanding the reason and implications of the differences. I suspect very few will notice this difference and those that do will be OK with conflict resolution doing its thing. cc @Anipik

  10. ghost locked as resolved and limited conversation to collaborators on Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions