-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed
Labels
Milestone
Description
Microsoft's portable builds perform a fall-back to the portable rid when the /etc/os-release/ rid is not known.
This doesn't work for non-portable builds because the information for the portable rid is missing in Microsoft.NETCore.App.deps.json.
For example, below is the full runtimes section of a Fedora 37 build. It does not include a section for linux-x64 (which is the fallback host rid).
"runtimes": {
"fedora.37-x64": [
"fedora.37",
"fedora-x64",
"fedora",
"linux-x64",
"linux",
"unix-x64",
"unix",
"any",
"base"
]For source-build, there should be an exact match with the rid found here and the /etc/os-release rid.
That may not be the case:
- Because the
/etc/os-releaserid is unexpected (like in System.PlatformNotSupportedException: System.IO.Ports is currently only supported on Windows. on Archlinux #79196). - It also happens when a distro gets upgraded, and the new version does not (yet) include packages for that .NET version. Then the existing .NET build will not know the new rid (
fedora.38-x64is unknown).
In these two cases, the Microsoft build will continue to work, while the source-build builds start failing.
We should include this information in the non-portable builds so the fallback works.