From 2ce76b861fcdcecbc3a1db9b7721a02aa68f1c82 Mon Sep 17 00:00:00 2001 From: leileizhang Date: Mon, 22 Sep 2025 19:10:35 +0800 Subject: [PATCH] Fix: central package version error (#41933) ## Summary of the Pull Request This PR updates the `BuildXamlIndexBeforeSettings` target to avoid running during DesignTimeBuild. Previously, the target was triggered before `CoreCompile`, which caused Visual Studio design-time builds to also invoke `Settings.UI.XamlIndexBuilder`. In design-time builds, the subproject may not fully inherit the central package version management configuration (e.g., `Directory.Packages.props` not included, or incomplete MSBuild property propagation). As a result, NuGet central package version management did not fully apply in design-time context, leading to false error such as: image ## 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 --- src/settings-ui/Settings.UI/PowerToys.Settings.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj index 68d0348c7d..36f1a9b75e 100644 --- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj +++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj @@ -184,7 +184,7 @@ - +