Skip to content

Commit b281500

Browse files
authored
Don't use BaseOS as the RID for publishing NativeAOT'd assets when OutputRID is the SDK's RID (#114755)
1 parent ce3c9df commit b281500

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/coreclr/tools/aot/ILCompiler/ILCompiler_publish.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
<PropertyGroup>
44
<_IsPublishing>true</_IsPublishing>
55
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
6-
<RuntimeIdentifier Condition="'$(BaseOS)' != ''">$(BaseOS)</RuntimeIdentifier>
6+
<!--
7+
If the output RID isn't the current SDK RID and we have a "base" RID, then the output RID isn't known to the SDK.
8+
In that case, we need to set the RuntimeIdentifier to the base RID so the SDK can find a runtime pack for publishing.
9+
-->
10+
<RuntimeIdentifier Condition="'$(OutputRID)' != '$(NETCoreSdkRuntimeIdentifier)' and '$(BaseOS)' != '' ">$(BaseOS)</RuntimeIdentifier>
711
<PublishDir>$(RuntimeBinDir)ilc-published/</PublishDir>
812
<SelfContained>true</SelfContained>
913
<PublishTrimmed>true</PublishTrimmed>

src/coreclr/tools/aot/crossgen2/crossgen2_publish.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
<PropertyGroup>
44
<_IsPublishing>true</_IsPublishing>
55
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
6-
<RuntimeIdentifier Condition="'$(BaseOS)' != ''">$(BaseOS)</RuntimeIdentifier>
6+
<!--
7+
If the output RID isn't the current SDK RID and we have a "base" RID, then the output RID isn't known to the SDK.
8+
In that case, we need to set the RuntimeIdentifier to the base RID so the SDK can find a runtime pack for publishing.
9+
-->
10+
<RuntimeIdentifier Condition="'$(OutputRID)' != '$(NETCoreSdkRuntimeIdentifier)' and '$(BaseOS)' != '' ">$(BaseOS)</RuntimeIdentifier>
711
<PublishDir>$(RuntimeBinDir)crossgen2-published/</PublishDir>
812
<SelfContained>true</SelfContained>
913
<PublishTrimmed>true</PublishTrimmed>

0 commit comments

Comments
 (0)