Skip to content

Commit 5a8775e

Browse files
committed
build(package&ci): Adjust the packaging configuration and optimize the CI workflow
- Add target framework and output path configuration in WAP project references - Replace the VS installation tool path and improve the workload installation detection logic - Added installation status check and SDK version verification steps
1 parent 55d2cc4 commit 5a8775e

2 files changed

Lines changed: 21 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,28 @@ jobs:
220220
shell: pwsh
221221
run: |
222222
$vsPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath
223-
$installer = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe"
223+
$installer = "C:\Program Files (x86)\Microsoft Visual Studio\Installer\setup.exe"
224224
225225
Write-Host "VS Path: $vsPath"
226-
Write-Host "Installing UWP workload..."
226+
Write-Host "Installer: $installer"
227227
228-
$args = "modify --installPath `"$vsPath`" --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 --quiet --norestart --wait"
229-
Start-Process -FilePath $installer -ArgumentList $args -NoNewWindow -Wait
228+
# List current workloads
229+
Write-Host "`n=== Current VS workloads ==="
230+
& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -all -format json | ConvertFrom-Json | ForEach-Object { $_.installationPath }
230231
231-
Write-Host "UWP workload installation complete"
232+
Write-Host "`nInstalling UWP workload with setup.exe..."
233+
$installArgs = "modify --installPath `"$vsPath`" --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.VisualStudio.Component.UWP.VC.ARM64 --passive --norestart --wait"
234+
Write-Host "Command: $installer $installArgs"
235+
236+
$process = Start-Process -FilePath $installer -ArgumentList $installArgs -NoNewWindow -Wait -PassThru
237+
Write-Host "Exit code: $($process.ExitCode)"
238+
239+
if ($process.ExitCode -ne 0) {
240+
Write-Warning "Installer exited with code $($process.ExitCode)"
241+
}
242+
243+
Write-Host "`n=== Checking UAP after install ==="
244+
Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\Platforms\UAP" -ErrorAction SilentlyContinue | Select-Object Name
232245
233246
- name: List Windows SDKs
234247
shell: pwsh

DevTools.Package/DevTools.Package.wapproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@
5555
<ProjectReference Include="..\DevTools.csproj">
5656
<Name>DevTools</Name>
5757
<IsAppxMainProject>true</IsAppxMainProject>
58+
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
59+
<SetTargetFramework>TargetFramework=net8.0-windows10.0.17763.0</SetTargetFramework>
60+
<TargetPath>DevTools.exe</TargetPath>
5861
</ProjectReference>
5962
</ItemGroup>
6063
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />

0 commit comments

Comments
 (0)