From 9aab0f38938b88ebf658fd385b26ab41abab60a1 Mon Sep 17 00:00:00 2001 From: Shawn Yuan <128874481+shuaiyuanxx@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:47:59 +0800 Subject: [PATCH] Fix pipeline with waskd2 exp (#44334) ## Summary of the Pull Request This pull request updates the WinAppSDK version used in the build pipeline to 1.8 and makes related improvements to the NuGet restore process and configuration handling. Version update: * Updated the default value of the `winAppSdkVersionNumber` parameter from `"1.7"` to `"1.8"` in `.pipelines/UpdateVersions.ps1`, ensuring the pipeline uses the latest WinAppSDK version. NuGet restore and configuration improvements: * Changed the `Add-NuGetSourceAndMapping` call in the `Resolve-WinAppSdkSplitDependencies` function to use the `$installDir` variable instead of a hardcoded path, improving flexibility for local package mapping in `.pipelines/UpdateVersions.ps1`. * Added a `workingDirectory` property to the NuGet restore step in `.pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml` to ensure the restore process operates from the correct directory. ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .pipelines/UpdateVersions.ps1 | 4 ++-- .../v2/templates/steps-update-winappsdk-and-restore-nuget.yml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pipelines/UpdateVersions.ps1 b/.pipelines/UpdateVersions.ps1 index 1c66db5459..4e68663236 100644 --- a/.pipelines/UpdateVersions.ps1 +++ b/.pipelines/UpdateVersions.ps1 @@ -1,7 +1,7 @@ Param( # Using the default value of 1.7 for winAppSdkVersionNumber and useExperimentalVersion as false [Parameter(Mandatory=$False,Position=1)] - [string]$winAppSdkVersionNumber = "1.7", + [string]$winAppSdkVersionNumber = "1.8", # When the pipeline calls the PS1 file, the passed parameters are converted to string type [Parameter(Mandatory=$False,Position=2)] @@ -161,7 +161,7 @@ function Resolve-WinAppSdkSplitDependencies { $configData = Read-FileWithEncoding -Path $nugetConfig [xml]$xml = $configData.Content - Add-NuGetSourceAndMapping -Xml $xml -Key "localpackages" -Value "localpackages\output" -Patterns $allLocalPackages + Add-NuGetSourceAndMapping -Xml $xml -Key "localpackages" -Value $installDir -Patterns $allLocalPackages $xml.Save($nugetConfig) Write-Host "Updated nuget.config with localpackages mapping." diff --git a/.pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml b/.pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml index 31c4279218..566c8045c4 100644 --- a/.pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml +++ b/.pipelines/v2/templates/steps-update-winappsdk-and-restore-nuget.yml @@ -35,3 +35,4 @@ steps: projects: '$(build.sourcesdirectory)\**\*.slnx' feedsToUse: 'config' nugetConfigPath: '$(build.sourcesdirectory)\nuget.config' + workingDirectory: '$(build.sourcesdirectory)'