Skip to content

Commit 41796ff

Browse files
authored
Fix non-portable CI builds. (dotnet#114949)
1 parent 5d9f756 commit 41796ff

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

eng/pipelines/runtime.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1786,11 +1786,12 @@ extends:
17861786
parameters:
17871787
platforms:
17881788
- name: CentOS9
1789+
baseOS: linux-x64
17891790
targetRID: centos.9-x64
17901791
portableBuild: false
17911792
container: SourceBuild_centos_x64
17921793
- name: NonexistentRID
1793-
baseOS: linux
1794+
baseOS: linux-x64
17941795
targetRID: banana.24-x64
17951796
portableBuild: false
17961797
container: SourceBuild_centos_x64

src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
<RuntimeIdentifier>$(OutputRID)</RuntimeIdentifier>
1212
<!-- Set the apphost RID so we download the apphost pack if needed. -->
1313
<AppHostRuntimeIdentifier>$(OutputRID)</AppHostRuntimeIdentifier>
14+
<!--
15+
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.
16+
In that case, we need to set the AppHostRuntimeIdentifier to the base RID so the SDK can find a runtime pack for publishing.
17+
-->
18+
<AppHostRuntimeIdentifier Condition="'$(OutputRID)' != '$(NETCoreSdkRuntimeIdentifier)' and '$(BaseOS)' != '' ">$(BaseOS)</AppHostRuntimeIdentifier>
1419
<UseLocalAppHostPack>true</UseLocalAppHostPack>
1520
<!-- Don't use the local apphost pack on Windows as matching linker configurations is difficult. -->
1621
<UseLocalAppHostPack Condition="'$(TargetOS)' == 'windows'">false</UseLocalAppHostPack>

0 commit comments

Comments
 (0)