Currently source-build determines the non-portable rid of the target platform by calling RuntimeInformation.RuntimeIdentifier:
<TargetRid Condition="'$(TargetRid)' == ''">$([System.Runtime.InteropServices.RuntimeInformation]::RuntimeIdentifier)</TargetRid>
The changes in dotnet/runtime#89598 mean this property will no longer return the rid based on Linux's /etc/os-release, but instead it will return the rid the .NET runtime was built for.
So when source-building .NET with a portable Microsoft SDK, the RuntimeIdentifier will be the portable rid of that SDK, and not the non-portable rid of the platform the build is running on.
The TargetRid should continue to default to the non-portable rid of the platform so we can identify portable from non-portable assets.
cc @MichaelSimons @elinor-fung @dsplaisted @omajid
Currently source-build determines the non-portable rid of the target platform by calling
RuntimeInformation.RuntimeIdentifier:The changes in dotnet/runtime#89598 mean this property will no longer return the rid based on Linux's
/etc/os-release, but instead it will return the rid the .NET runtime was built for.So when source-building .NET with a portable Microsoft SDK, the
RuntimeIdentifierwill be the portable rid of that SDK, and not the non-portable rid of the platform the build is running on.The
TargetRidshould continue to default to the non-portable rid of the platform so we can identify portable from non-portable assets.cc @MichaelSimons @elinor-fung @dsplaisted @omajid