Skip to content

.NET 5: RID changes made in servicing are missing from shared framework deps file, breaking RID-asset selection for framework dependent applications on new RIDs #50739

Closed

Description

@mthalman

Description

As part of the work to add support for Alpine 3.13, a RID for it has not been included in the Microsoft.NETCore.App.deps.json file.

This command returns no results:

$ cat /usr/share/dotnet/shared/Microsoft.NETCore.App/5.0.5/Microsoft.NETCore.App.deps.json | grep alpine.3.13

This causes the RID of the runtime environment to only show linux-musl-x64 rather than the more specific alpine.3.13-x64 RID.

$ dotnet --info
.NET SDK (reflecting any global.json):
 Version:   5.0.202
 Commit:    db7cc87d51

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.13
 OS Platform: Linux
 RID:         linux-musl-x64
 Base Path:   /usr/share/dotnet/sdk/5.0.202/

Host (useful for support):
  Version: 5.0.5
  Commit:  2f740adc14

.NET SDKs installed:
  5.0.202 [/usr/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 5.0.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 5.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

Configuration

This behavior only occurs in .NET 5.0.

Regression?

Other information

Activity

  1. ghost added
    untriaged
    on Apr 5, 2021
  2. mthalman commented on Apr 5, 2021

    @mthalman
    MemberAuthor

    cc @rbhanda - We need to catch this sooner as part of signing off on new platforms.

  3. added this to the 6.0.0 milestone on Apr 13, 2021
  4. added
    help wanted
    and removed
    untriaged
    on Apr 13, 2021
  5. LiangZugeng commented on Jul 12, 2021

    @LiangZugeng

    @joperezr Is there any plan (before 6.0) to add the alpine.3.13 RID into Microsoft.NETCore.App.deps.json? I tested the 5.0.7 SDK docker image and the RID is still incorrect.

    / # dotnet --info
    .NET SDK (reflecting any global.json):
     Version:   5.0.301
     Commit:    ef17233f86
    
    Runtime Environment:
     OS Name:     alpine
     OS Version:  3.13
     OS Platform: Linux
     RID:         linux-musl-x64
     Base Path:   /usr/share/dotnet/sdk/5.0.301/
    
    Host (useful for support):
      Version: 5.0.7
      Commit:  556582d964
    
    .NET SDKs installed:
      5.0.301 [/usr/share/dotnet/sdk]
    
    .NET runtimes installed:
      Microsoft.AspNetCore.App 5.0.7 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
      Microsoft.NETCore.App 5.0.7 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
    

    Could it be fixed in the next minor version of 5.0.7? It has a bigger impact than it seems to be. Due to this issue, unit tests using SQLite will fail in .NET 5.0 Alpine 3.13 docker container, some people (including me) have to fall back to .NET 5.0 Alpine 3.12 docker image to correctly run unit tests. For more information please see dotnet/efcore#24189

  6. added and removed
    help wanted
    on Jul 13, 2021
  7. added
    Servicing-consider
    on Jul 13, 2021
  8. ericstj commented on Jul 13, 2021

    @ericstj
    Member

    From @dagood in dotnet/efcore#24189 (comment)

    It looks like the Microsoft.NETCore.Platforms version was pinned to 5.0.0 by #43182 and it hasn't been updated since then to match the live version, so it faithfully continues to use 5.0.0. It seems odd to me that it used 5.0.0 rather than $(ProductVersion), and that it was merged with a * NO MERGE * label active(explained in PR description).

    The Microsoft.NETCore.Platforms 5.0.0 package name/version shows up in the deps.json file, so I don't think it'll be hard to spot for specific tar.gzs. And yeah, fedora.35-x64 is also missing in a tar.gz I pulled for 5.0.7.

    /cc @dleeapho @NikolaMilosavljevic

  9. ericstj commented on Jul 13, 2021

    @ericstj
    Member

    It seems odd to me that it used 5.0.0 rather than `$(ProductVersion)

    Agree that's odd, however using $(ProductVersion) might meant that the installer subset needs to restore and consume a package built by the libraries subset. Perhaps rather than $(ProductVersion) it should be

    <PlatformPackageVersion>5.0.2</PlatformPackageVersion>

    In 3.x this made sense in core-setup since the package was coming from a different repo, now that they are in the same repo it doesn't make sense.

    In 6.0 this is happening via direct consumption of the runtime.json file. https://github.com/dotnet/arcade/blob/1b053babb8a542e3ab20f93b3d0aedc732b7e0c7/src/Microsoft.DotNet.SharedFramework.Sdk/src/GenerateSharedFrameworkDepsFile.cs#L42

    Perhaps that's the best fix for 5.0 as well.

  10. modified the milestones: 6.0.0, 5.0.x on Jul 13, 2021
  11. added and removed
    Servicing-consider
    on Jul 13, 2021
  12. changed the title [-].NET 5: RID for Alpine 3.13 is missing in Microsoft.NETCore.App.deps.json[/-] [+].NET 5: RID changes made in servicing are missing from shared framework deps file, breaking RID-asset selection for framework dependent applications on new RIDs[/+] on Jul 13, 2021
  13. dagood commented on Jul 13, 2021

    @dagood
    Member

    Ah... Microsoft.NETCore.Platforms is not always built/shipped with the current version. Yeah, probably needs to be matched up with that property. (Is the package always at least built, or is it sometimes disabled completely? How? Is this infra also fragile?)

  14. dagood commented on Jul 13, 2021

    @dagood
    Member

    Is the package always at least built

    In 6.0 this is happening via direct consumption of the runtime.json file.

    On second thought, since the runtime.json file is just a literal file in the repo, I suppose nothing has to be built. It might be worth considering if it would be bad if someone made a change to the runtime.json and forgot to make Microsoft.NETCore.Platforms build, so the tar.gz would contain newer RIDs than the latest publicly available Microsoft.NETCore.Platforms package.

  15. ericstj commented on Jul 13, 2021

    @ericstj
    Member

    if it would be bad if someone made a change to the runtime.json and forgot to make Microsoft.NETCore.Platforms build

    We have the same problem with every nuget package in the repo. That's a tradeoff we accept for selective servicing.

    I believe that the latest SDKs carry a copy of the runtime.json so we can just ensure that it flows there through a transport package that always builds instead of Microsoft.NETCore.Platforms at which point Microsoft.NETCore.Platforms is largely redundant.

  16. ViktorHofer commented on Sep 3, 2021

    @ViktorHofer
    Member

    @ericstj can this issue be closed given that dotnet/arcade#7643 was merged?

  17. Anipik commented on Sep 3, 2021

    @Anipik
    Contributor

    I verified the fix in the final bits, we might want to wait until we release before closing.

  18. ViktorHofer commented on Sep 3, 2021

    @ViktorHofer
    Member

    If the necessary fix is already merged and the final bits prove its correctness, this should be fine to close. Thanks Anirudh for validating.

  19. added a commit that references this issue on Sep 14, 2021
  20. ghost locked as resolved and limited conversation to collaborators on Oct 3, 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