Skip to content

Commit 8ba1198

Browse files
busec0claudeCopilot
authored
Pin .NET SDK and Xcode for dotnet-maui CI (#271)
* add version pinning * fix: split workload update and restore to allow rollback file dotnet workload restore --from-rollback-file fails because the command internally invokes install with --skip-manifest-update, which conflicts with --from-rollback-file. Use update first to pin manifest versions, then plain restore to install workloads using those pins. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix: pin iOS/maccatalyst TargetPlatformVersion to 18.2 The workload manifest pin alone wasn't enough — the macos-26 runner has the iOS 26.2 SDK pack pre-installed, so MSBuild resolved net9.0-ios to the highest available TPV (26.2.9008), which requires Xcode 26.3. Pinning the TPV explicitly (net9.0-ios18.2, net9.0-maccatalyst18.2) forces MSBuild to use the 18.2 SDK pack regardless of what newer packs are installed on the runner. Updates the workflow build/output paths, UITests path lookup, and README examples to match. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Update dotnet-maui/global.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * revert workload pin, use latest .NET iOS workload with Xcode 26.3 The workload manifest pin (18.2.9173) didn't expose a usable TPV path on the macos-26 runner — NETSDK1140 listed only 18.0 and 26.2 as valid. Rather than fight pack resolution, take the simpler route: use the latest workload and pin Xcode to 26.3 (which is what 26.2.9008 needs). Keeps the SDK pin in dotnet-maui/global.json and the explicit Xcode selection in CI so the "out of sync Xcode/.NET iOS" failure mode is still controlled, just from the Xcode side. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c6204bb commit 8ba1198

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

.github/workflows/dotnet-maui-ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup .NET
2525
uses: actions/setup-dotnet@v4
2626
with:
27-
dotnet-version: "9.0.x"
27+
global-json-file: dotnet-maui/global.json
2828

2929
- name: Create test .env file
3030
run: |
@@ -61,7 +61,7 @@ jobs:
6161
- name: Setup .NET
6262
uses: actions/setup-dotnet@v4
6363
with:
64-
dotnet-version: "9.0.x"
64+
global-json-file: dotnet-maui/global.json
6565

6666
- name: Setup Android SDK
6767
uses: android-actions/setup-android@v3
@@ -101,10 +101,15 @@ jobs:
101101
- name: Checkout code
102102
uses: actions/checkout@v4
103103

104+
- name: Setup Xcode
105+
uses: maxim-lobanov/setup-xcode@v1
106+
with:
107+
xcode-version: "26.3"
108+
104109
- name: Setup .NET
105110
uses: actions/setup-dotnet@v4
106111
with:
107-
dotnet-version: "9.0.x"
112+
global-json-file: dotnet-maui/global.json
108113

109114
- name: Create .env file
110115
run: |
@@ -159,7 +164,7 @@ jobs:
159164
- name: Setup .NET
160165
uses: actions/setup-dotnet@v4
161166
with:
162-
dotnet-version: "9.0.x"
167+
global-json-file: dotnet-maui/global.json
163168

164169
- name: Download Android APK artifact
165170
uses: actions/download-artifact@v4
@@ -285,7 +290,7 @@ jobs:
285290
- name: Setup .NET
286291
uses: actions/setup-dotnet@v4
287292
with:
288-
dotnet-version: "9.0.x"
293+
global-json-file: dotnet-maui/global.json
289294

290295
- name: Download iOS IPA artifact
291296
uses: actions/download-artifact@v4

dotnet-maui/global.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"sdk": {
3+
"version": "9.0.102",
4+
"rollForward": "latestPatch"
5+
}
6+
}

0 commit comments

Comments
 (0)