Skip to content

Commit 0b5a35f

Browse files
committed
Add MAUI workload installation to GitHub Actions workflows
- Install dotnet workload maui in all workflow jobs - Add build tasks compilation before main solution build - Add Android SDK setup for Linux runners - Ensure proper build order for MAUI projects This should fix the workload missing errors in GitHub Actions.
1 parent f490977 commit 0b5a35f

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.github/workflows/ci-build-and-test.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,19 @@ jobs:
4646
distribution: 'microsoft'
4747
java-version: '17'
4848

49+
- name: Setup Android SDK (Linux only)
50+
if: matrix.os == 'ubuntu-latest'
51+
uses: android-actions/setup-android@v3
52+
4953
- name: Install dotnet tools
5054
run: dotnet tool restore
5155

56+
- name: Install MAUI workload
57+
run: dotnet workload install maui
58+
59+
- name: Build build tasks (required first)
60+
run: dotnet build ./Microsoft.Maui.BuildTasks.slnf
61+
5262
- name: Restore dependencies
5363
run: dotnet restore Microsoft.Maui.sln
5464

.github/workflows/ci-extended-build.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ jobs:
4343
- name: Install dotnet tools
4444
run: dotnet tool restore
4545

46+
- name: Install MAUI workload
47+
run: dotnet workload install maui
48+
4649
- name: Build build tasks
4750
run: dotnet build ./Microsoft.Maui.BuildTasks.slnf
4851

@@ -91,6 +94,9 @@ jobs:
9194
- name: Install dotnet tools
9295
run: dotnet tool restore
9396

97+
- name: Install MAUI workload
98+
run: dotnet workload install maui
99+
94100
- name: Build build tasks
95101
run: dotnet build ./Microsoft.Maui.BuildTasks.slnf
96102

@@ -122,6 +128,9 @@ jobs:
122128
- name: Install dotnet tools
123129
run: dotnet tool restore
124130

131+
- name: Install MAUI workload
132+
run: dotnet workload install maui
133+
125134
- name: Build build tasks
126135
run: dotnet build ./Microsoft.Maui.BuildTasks.slnf
127136

@@ -154,6 +163,9 @@ jobs:
154163
- name: Install dotnet tools
155164
run: dotnet tool restore
156165

166+
- name: Install MAUI workload
167+
run: dotnet workload install maui
168+
157169
- name: Build device tests
158170
run: |
159171
echo "Building device tests (Android only in public runners)..."

.github/workflows/staged-ci-orchestrator.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,15 @@ jobs:
5959
- name: Install dotnet tools
6060
run: dotnet tool restore
6161

62+
- name: Install MAUI workload
63+
run: dotnet workload install maui
64+
6265
- name: Build and test
6366
id: build-test
6467
run: |
68+
echo "Building build tasks first..."
69+
dotnet build ./Microsoft.Maui.BuildTasks.slnf
70+
6571
echo "Building .NET MAUI solution..."
6672
dotnet build Microsoft.Maui.sln --configuration Release
6773

0 commit comments

Comments
 (0)