CI: avoid restoring Windows MAUI runtime packs in CI/tooling by skipping Windows TFM; make SkipWindowsTargetFramework property controllable
Some checks failed
Build / build (pull_request) Failing after 34s

This commit is contained in:
Tim Krampitz
2026-10-04 17:58:18 +02:00
parent c4915542fe
commit 21cb57fd74
2 changed files with 4 additions and 2 deletions

View File

@@ -23,7 +23,8 @@ jobs:
run: dotnet workload install maui run: dotnet workload install maui
- name: Restore - name: Restore
run: dotnet restore SlipItIn.slnx # Skip restoring the Windows target frameworks to avoid requiring Windows runtime packs in CI/tooling environments
run: dotnet restore SlipItIn.slnx -p:SkipWindowsTargetFramework=true
- name: Build Server-Stack - name: Build Server-Stack
run: | run: |

View File

@@ -3,7 +3,8 @@
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net10.0-android</TargetFrameworks> <TargetFrameworks>net10.0-android</TargetFrameworks>
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);</TargetFrameworks> <TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks> <!-- Windows target framework can be skipped by setting SkipWindowsTargetFramework=true during restore/build (useful for CI or tooling without Windows runtime packs) -->
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(SkipWindowsTargetFramework)' != 'true'">$(TargetFrameworks);net10.0-windows10.0.19041.0</TargetFrameworks>
<LangVersion>preview</LangVersion> <LangVersion>preview</LangVersion>
<!-- Note for MacCatalyst: <!-- Note for MacCatalyst: