Skip to content

Commit ee6dc8b

Browse files
committed
Fix CI: use VS MSBuild for WinAppSdk with dotnet SDK paths
1 parent dcbf14e commit ee6dc8b

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,17 @@ jobs:
5151
5252
- name: Restore & Build WinAppSdk library
5353
shell: pwsh
54+
env:
55+
# Let VS MSBuild find the .NET 10 SDK installed by setup-dotnet
56+
DOTNET_HOST_PATH: ${{ env.DOTNET_ROOT }}\dotnet.exe
5457
run: |
55-
dotnet restore src/CompositionCollectionView.WinAppSdk/CompositionCollectionView.WinAppSdk.csproj
56-
dotnet build src/CompositionCollectionView.WinAppSdk/CompositionCollectionView.WinAppSdk.csproj `
57-
-c Release `
58-
--no-restore `
59-
-p:Platform=x64 `
60-
-p:VsInstallRoot="${{ steps.vs.outputs.VS_PATH }}"
58+
# Restore with dotnet (guaranteed to have .NET 10 SDK)
59+
dotnet restore src/CompositionCollectionView.WinAppSdk/CompositionCollectionView.WinAppSdk.csproj -p:Platform=x64
60+
# Build with VS MSBuild (has PRI tools) using dotnet SDK's .NET 10 targets
61+
& "${{ steps.vs.outputs.MSBUILD }}" src/CompositionCollectionView.WinAppSdk/CompositionCollectionView.WinAppSdk.csproj `
62+
/t:Build /p:Configuration=Release /p:Platform=x64 `
63+
"/p:DotNetRoot=$env:DOTNET_ROOT\" `
64+
"/p:NetCoreTargetingPackRoot=$env:DOTNET_ROOT\packs"
6165
6266
- name: Pack NuGet
6367
shell: pwsh

0 commit comments

Comments
 (0)