From 23bc278cc89b24e999e275d02b746555e8f5cf6f Mon Sep 17 00:00:00 2001 From: Kai Tao <69313318+vanzue@users.noreply.github.com> Date: Tue, 9 Dec 2025 14:22:18 +0800 Subject: [PATCH] Cmdpal: Fix cmdpal toolkit restore failure for slnx in release pipeline (#44152) ## Summary of the Pull Request Error from pipeline: Invalid input 'PowerToys.slnx'. The file type was not recognized. MSBuild version 17.14.23+b0019275e for .NET Framework Build started 12/8/2025 6:33:14 AM. Nuget support for slnx will be ready in nuget version 7, so use msbuild to restore ## 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 image --- .pipelines/ESRPSigning_core.json | 5 +++++ .pipelines/versionAndSignCheck.ps1 | 7 ++++++- .../Microsoft.CommandPalette.Extensions.vcxproj | 2 +- .../Microsoft.CommandPalette.Extensions/packages.config | 4 ++-- src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 | 8 +++++++- 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index f4e3e1ba38..e3ebffc20c 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -353,6 +353,11 @@ "Microsoft.SemanticKernel.Connectors.Ollama.dll", "OllamaSharp.dll", + "boost_regex-vc143-mt-gd-x32-1_87.dll", + "boost_regex-vc143-mt-gd-x64-1_87.dll", + "boost_regex-vc143-mt-x32-1_87.dll", + "boost_regex-vc143-mt-x64-1_87.dll", + "UnitsNet.dll", "UtfUnknown.dll", "Wpf.Ui.dll" diff --git a/.pipelines/versionAndSignCheck.ps1 b/.pipelines/versionAndSignCheck.ps1 index 1bb271300d..f90e59afd6 100644 --- a/.pipelines/versionAndSignCheck.ps1 +++ b/.pipelines/versionAndSignCheck.ps1 @@ -52,7 +52,12 @@ $nullVersionExceptions = @( "System.Diagnostics.EventLog.Messages.dll", "Microsoft.Windows.Widgets.dll", "AdaptiveCards.ObjectModel.WinUI3.dll", - "AdaptiveCards.Rendering.WinUI3.dll") -join '|'; + "AdaptiveCards.Rendering.WinUI3.dll", + "boost_regex_vc143_mt_gd_x32_1_87.dll", + "boost_regex_vc143_mt_gd_x64_1_87.dll", + "boost_regex_vc143_mt_x32_1_87.dll", + "boost_regex_vc143_mt_x64_1_87.dll" + ) -join '|'; $totalFailure = 0; Write-Host $DirPath; diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj index a6cad871ab..fb647cc444 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj @@ -4,7 +4,7 @@ ..\..\..\..\..\ $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.8.250907003 $(PathToRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5 - $(PathToRoot)packages\Microsoft.Windows.SDK.BuildTools.10.0.26100.4188 + $(PathToRoot)packages\Microsoft.Windows.SDK.BuildTools.10.0.26100.6901 $(PathToRoot)packages\Microsoft.Web.WebView2.1.0.2903.40 diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config index e945c5824d..091ef0782d 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config @@ -12,6 +12,6 @@ - + - \ No newline at end of file + diff --git a/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 b/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 index 4390f0120e..2afad38df5 100644 --- a/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 +++ b/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 @@ -54,9 +54,15 @@ if ($IsAzurePipelineBuild) { } else { $nugetPath = (Join-Path $PSScriptRoot "NugetWrapper.cmd") } +$solutionPath = (Join-Path $PSScriptRoot "..\..\..\..\..\PowerToys.slnx") if (($BuildStep -ieq "all") -Or ($BuildStep -ieq "build")) { - & $nugetPath restore (Join-Path $PSScriptRoot "..\..\..\..\..\PowerToys.slnx") + $restoreArgs = @( + $solutionPath + "/t:Restore" + "/p:RestorePackagesConfig=true" + ) + & $msbuildPath $restoreArgs Try { foreach ($config in $Configuration.Split(",")) {