Skip to content

Update Azure Linux 3.0 RID mapping#53722

Open
richlander wants to merge 1 commit intomainfrom
rich/update-azurelinux-3-0-rid-mapping
Open

Update Azure Linux 3.0 RID mapping#53722
richlander wants to merge 1 commit intomainfrom
rich/update-azurelinux-3-0-rid-mapping

Conversation

@richlander
Copy link
Copy Markdown
Member

Note

This PR was AI/Copilot-generated.

Summary

Update the layout RID normalization to key off Azure Linux 3.0 instead of the old Mariner 2.0 RID string while continuing to map to the existing cm.2 runtime assets.

  • replace the stale mariner.2.0 string match with azurelinux.3.0
  • keep the existing cm.2 runtime RID normalization behavior

Follow-up to dotnet/runtime#126528.

Replace the stale Mariner 2.0 RID string check with the Azure Linux 3.0 RID while keeping the cm.2 runtime RID normalization in place.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 6, 2026 21:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the layout build RID normalization logic to recognize Azure Linux 3.0 RIDs (instead of the older Mariner 2.0 string) while still mapping runtime asset selection to the existing cm.2 RID.

Changes:

  • Update the NetRuntimeRid normalization check from mariner.2.0 to azurelinux.3.0.
  • Preserve the normalization target to cm.2 for runtime asset compatibility.

<NetRuntimeRid Condition="'$(NetRuntimeRid)' == ''">$(HostRid)</NetRuntimeRid>
<NetRuntimeRid Condition="('$(OSName)' == 'win' or '$(OSName)' == 'osx' or '$(OSName)' == 'freebsd' or '$(OSName)' == 'openbsd' or '$(OSName)' == 'illumos' or '$(OSName)' == 'solaris' or '$(OSName)' == 'haiku') and '$(DotNetBuildSourceOnly)' != 'true'">$(OSName)-$(TargetArchitecture)</NetRuntimeRid>
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('mariner.2.0'))">$(HostRid.Replace('mariner.2.0', 'cm.2'))</NetRuntimeRid>
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('azurelinux.3.0'))">$(HostRid.Replace('azurelinux.3.0', 'cm.2'))</NetRuntimeRid>
Copy link

Copilot AI Apr 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The condition is based on NetRuntimeRid, but the replacement is applied to HostRid. If NetRuntimeRid is set explicitly (e.g., for cross/target layout generation), this will overwrite it with a value derived from the host RID (and potentially the host architecture), which can produce an incorrect runtime RID. Consider applying the replacement to $(NetRuntimeRid) (or, if the intent is host-only normalization, make the condition check HostRid.StartsWith(...) as well) so the same RID is used consistently.

Suggested change
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('azurelinux.3.0'))">$(HostRid.Replace('azurelinux.3.0', 'cm.2'))</NetRuntimeRid>
<NetRuntimeRid Condition="'$(DotNetBuild)' != 'true' and $(NetRuntimeRid.StartsWith('azurelinux.3.0'))">$(NetRuntimeRid.Replace('azurelinux.3.0', 'cm.2'))</NetRuntimeRid>

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants