Skip to content

Commit 8347429

Browse files
committed
Fix MAUI Windows publish: use RuntimeIdentifierOverride to avoid Mono runtime pack
1 parent 063c673 commit 8347429

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,16 @@ jobs:
9393
Copy-Item $apk.FullName "dist/ServerRemote.App-android-${{ steps.ver.outputs.version }}.apk"
9494
9595
# --- ServerRemote.App : Windows (unpackaged, self-contained) ---
96+
# MAUI/WinUI must use RuntimeIdentifierOverride instead of -r; passing
97+
# -r win-x64 makes the build resolve a non-existent Mono runtime pack
98+
# (Microsoft.NETCore.App.Runtime.Mono.win-x64) and fail to restore.
9699
- name: Publish App (Windows)
97100
shell: pwsh
98101
run: >
99102
dotnet publish src/ServerRemote.App
100103
-f net10.0-windows10.0.19041.0
101104
-c Release
102-
-r ${{ env.WIN_RID }}
105+
-p:RuntimeIdentifierOverride=win10-x64
103106
--self-contained
104107
-p:WindowsPackageType=None
105108
-o publish/app-windows

0 commit comments

Comments
 (0)