Skip to content

Preview 5 has two identical copies of System.Security.Cryptography.Cng.dll #54427

Closed

Description

@ericsink

In .NET 6 preview 5, there are identical copies of System.​Security.​Cryptography.​Cng.dll in two different targeting packs, one in Microsoft.​NETCore.​App.Ref and another in Microsoft.​AspNetCore.​App.Ref.

I first mentioned this in a Tweet:

https://twitter.com/eric_sink/status/1405727524194242566

to which @davidfowl replied "That sounds like a bug...", so I figured it should be logged, and hopefully this is the right place.

Activity

  1. davidfowl commented on Jun 18, 2021

    @davidfowl
    Member
  2. ericstj commented on Jun 18, 2021

    @ericstj
    Member

    Confirmed this is the case. @dougbu, this needs to be removed from ASP.NET ref-pack. Looks like it's no longer in runtime pack/shared-fx but still present in ref-pack.

  3. transferred this issue fromdotnet/sdkon Jun 18, 2021
  4. dougbu commented on Jun 18, 2021

    @dougbu
    Contributor

    Was this assembly added to Microsoft.NETCore.App.* while we weren't looking❔ We've long (at least since 3.1.0) had a weird case where Cryptography.Cng was in our targeting packs but not our runtimes (and visa-versa for Cryptography.Pkcs).

    The Microsoft.NETCore.App.Ref content changed between preview 4 and 5, adding Cryptography.Cng (and Cryptograph.OpenSsl). Was that change intentional @ericstj❔ If it matters, I don't see any changes in that period between the runtimes.

  5. dougbu commented on Jun 18, 2021

    @dougbu
    Contributor

    In any case, something odd is happening.

    https://github.com/dotnet/aspnetcore/blob/1ead7696c823ca9d96a7bea65760d7fc03f375ce/src/Framework/App.Ref/src/Microsoft.AspNetCore.App.Ref.csproj#L147

    in our App.Ref exclusions should mean we don't duplicate anything from Microsoft.NETCore.App.Ref in our Microsoft.AspNetCore.App.Ref.

  6. dougbu commented on Jun 18, 2021

    @dougbu
    Contributor

    @ericstj if Cryptography.Cng was intentionally added to Microsoft.NETCore.App.Ref, the bug here is leaving System.Security.Cryptography.Cng in Microsoft.AspNetCore.Internal.Transport. Our repo expects the transport package to contain only additional ref/ assemblies we need. The duplication between Microsoft.AspNetCore.Internal.Transport and Microsoft.NETCore.App.Ref can't be correct and special-casing it to avoid this bug seems Just Wrong:tm:

    (Side note: We still don't need implementation assemblies in Microsoft.AspNetCore.Internal.Transport)

  7. ericstj commented on Jun 18, 2021

    @ericstj
    Member

    Yes it was exposed with #51853. Cc @ViktorHofer

  8. ericstj commented on Jun 18, 2021

    @ericstj
    Member

    To remove from the transport package we need to remove

  9. transferred this issue fromdotnet/aspnetcoreon Jun 18, 2021
  10. ghost added
    untriaged
    on Jun 18, 2021
  11. dougbu commented on Jun 18, 2021

    @dougbu
    Contributor

    I like one line fixes 😃

  12. added and removed
    untriaged
    on Jun 18, 2021
  13. self-assigned this
    on Jun 18, 2021
  14. ghost added
    in-pr
    on Jun 18, 2021
  15. ghost removed
    in-pr
    on Jun 19, 2021
  16. ghost locked as resolved and limited conversation to collaborators on Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions