2020-12-14 15:20:45 +03:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
2021-07-12 13:35:57 +03:00
|
|
|
<Project ToolsVersion="4.0"
|
|
|
|
|
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
2020-12-14 15:20:45 +03:00
|
|
|
|
Build: Fix release pipeline and local build failure (#45211)
## Summary of the Pull Request
Release pipeline is keeping failed, and local build failed at ut.
This pull request introduces changes to improve how test projects are
handled during release builds, ensuring that test code is not compiled
or analyzed when not needed - in doing release build, to - succeed the
execution and reduce built time.
And, to upgrade from VS17 to VS18 in cmdpal sdk build, this is to keep
consistency with all other build step
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [ ] Closes: #xxx
<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **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
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Local build & release pipeline build should all pass:
Local build:
<img width="1815" height="281" alt="image"
src="https://github.com/user-attachments/assets/f350cf3f-b856-432d-97f3-e392d38ef7fa"
/>
Release pipeline is working too:
<img width="1195" height="163" alt="image"
src="https://github.com/user-attachments/assets/ce58de38-f0fb-45ad-9d70-2b8eb1c4db60"
/>
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-02 09:15:53 +08:00
|
|
|
<!-- Skip building C++ test projects when BuildTests=false -->
|
|
|
|
|
<PropertyGroup Condition="'$(_IsSkippedTestProject)' == 'true'">
|
|
|
|
|
<UsePrecompiledHeaders>false</UsePrecompiledHeaders>
|
|
|
|
|
<RunCodeAnalysis>false</RunCodeAnalysis>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2020-12-14 15:20:45 +03:00
|
|
|
<!-- Project configurations -->
|
|
|
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
|
|
|
<ProjectConfiguration Include="Debug|x64">
|
|
|
|
|
<Configuration>Debug</Configuration>
|
|
|
|
|
<Platform>x64</Platform>
|
|
|
|
|
</ProjectConfiguration>
|
|
|
|
|
<ProjectConfiguration Include="Release|x64">
|
|
|
|
|
<Configuration>Release</Configuration>
|
|
|
|
|
<Platform>x64</Platform>
|
|
|
|
|
</ProjectConfiguration>
|
2022-08-27 02:17:20 +03:00
|
|
|
<ProjectConfiguration Include="Debug|ARM64">
|
|
|
|
|
<Configuration>Debug</Configuration>
|
|
|
|
|
<Platform>ARM64</Platform>
|
|
|
|
|
</ProjectConfiguration>
|
|
|
|
|
<ProjectConfiguration Include="Release|ARM64">
|
|
|
|
|
<Configuration>Release</Configuration>
|
|
|
|
|
<Platform>ARM64</Platform>
|
|
|
|
|
</ProjectConfiguration>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ItemGroup>
|
2021-07-12 13:35:57 +03:00
|
|
|
|
2022-12-10 00:09:26 +00:00
|
|
|
<!-- Run code analysis locally and in PR CI, but not on release CI -->
|
|
|
|
|
<PropertyGroup Condition="'$(SkipCppCodeAnalysis)' == ''">
|
|
|
|
|
<RunCodeAnalysis>true</RunCodeAnalysis>
|
|
|
|
|
<CodeAnalysisRuleSet>$(MsbuildThisFileDirectory)\CppRuleSet.ruleset</CodeAnalysisRuleSet>
|
2025-11-13 17:59:21 -06:00
|
|
|
<CAExcludePath>$(MSBuildThisFileDirectory)deps;$(MSBuildThisFileDirectory)packages;$(CAExcludePath)</CAExcludePath>
|
2022-12-10 00:09:26 +00:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2020-12-14 15:20:45 +03:00
|
|
|
<!-- C++ source compile-specific things for all configurations -->
|
2021-07-12 13:35:57 +03:00
|
|
|
<PropertyGroup>
|
2022-09-05 15:39:56 +03:00
|
|
|
<PreferredToolArchitecture>x64</PreferredToolArchitecture>
|
2022-12-15 18:40:29 -05:00
|
|
|
<PreferredToolArchitecture Condition="'$(PROCESSOR_ARCHITECTURE)' == 'ARM64' or '$(PROCESSOR_ARCHITEW6432)' == 'ARM64'">arm64</PreferredToolArchitecture>
|
2022-08-27 02:17:20 +03:00
|
|
|
<VcpkgEnabled>false</VcpkgEnabled>
|
2024-07-18 15:48:46 +02:00
|
|
|
<ReplaceWildcardsInProjectItems>true</ReplaceWildcardsInProjectItems>
|
2025-11-13 17:59:21 -06:00
|
|
|
<ExternalIncludePath>$(MSBuildThisFileDirectory)deps;$(MSBuildThisFileDirectory)packages;$(ExternalIncludePath)</ExternalIncludePath>
|
2023-10-04 09:40:01 -05:00
|
|
|
<!-- Enable control flow guard for C++ projects that don't consume any C++ files -->
|
|
|
|
|
<!-- This covers the case where a .dll exports a .lib, but doesn't have any ClCompile entries. -->
|
|
|
|
|
<LinkControlFlowGuard>Guard</LinkControlFlowGuard>
|
2021-07-12 13:35:57 +03:00
|
|
|
</PropertyGroup>
|
2020-12-14 15:20:45 +03:00
|
|
|
<ItemDefinitionGroup>
|
|
|
|
|
<ClCompile>
|
2025-12-16 10:46:39 +08:00
|
|
|
<!-- Make angle-bracket includes external and turn off code analysis for them -->
|
|
|
|
|
<TreatAngleIncludeAsExternal>true</TreatAngleIncludeAsExternal>
|
|
|
|
|
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
|
|
|
|
<DisableAnalyzeExternal>true</DisableAnalyzeExternal>
|
|
|
|
|
|
2024-03-22 03:29:14 -07:00
|
|
|
<MultiProcessorCompilation>true</MultiProcessorCompilation>
|
|
|
|
|
<PrecompiledHeader Condition="'$(UsePrecompiledHeaders)' != 'false'">Use</PrecompiledHeader>
|
2022-11-09 14:41:14 +00:00
|
|
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
2022-11-08 16:27:24 +00:00
|
|
|
<WarningLevel>Level4</WarningLevel>
|
[Dev][Build] VS 2026 Support (#44304)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
This PR updates the PowerToys solution to support **Visual Studio 2026
(PlatformToolset v145)**. It centralizes the build configuration,
updates the C++ language standards, and fixes an issue with a MouseJump
unit test that appears while using the VS 2026 supported build agent.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [ ] Closes: #xxx
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [x] **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
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
**Build System & Configuration:**
- Updated `Cpp.Build.props` to use `v145` (VS 2026) as the default
`PlatformToolset`, with fall back to `v143` for VS 2022.
- Configured C++ Language Standard:
- `stdcpplatest` for production projects.
- Removed explicit `<PlatformToolset>` definitions from individual
project files (approx. 37 modules) to inherit correctly from the central
`Cpp.Build.props`.
**Code Refactoring & Fixes:**
- Updated `DrawingHelperTests.cs` in MouseJump Unit Test to ease the
pixel difference tolerance. This became an issue after switching to the
new VS2026 build agent.
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Validated successful compilation of the entire solution. Similar
updates have been made to the .NET 10 branch, but these are much cleaner
and will be merged into that branch once fully confirmed working.
---------
Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2026-01-28 18:46:34 -05:00
|
|
|
<DisableSpecificWarnings>4679;4706;4874;5271;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
2021-07-12 13:35:57 +03:00
|
|
|
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
|
|
|
|
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
2020-12-14 15:20:45 +03:00
|
|
|
<ConformanceMode>false</ConformanceMode>
|
2020-12-21 18:51:48 +03:00
|
|
|
<TreatWarningAsError>true</TreatWarningAsError>
|
2020-12-14 15:20:45 +03:00
|
|
|
<LanguageStandard>stdcpplatest</LanguageStandard>
|
2023-10-04 09:40:01 -05:00
|
|
|
<BuildStlModules>false</BuildStlModules>
|
2020-12-14 15:20:45 +03:00
|
|
|
<AdditionalOptions>/await %(AdditionalOptions)</AdditionalOptions>
|
2023-10-19 15:04:09 +01:00
|
|
|
<!-- TODO: _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING for compatibility with VS 17.8. Check if we can remove. -->
|
|
|
|
|
<PreprocessorDefinitions>_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING;_UNICODE;UNICODE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
2023-10-04 09:40:01 -05:00
|
|
|
<!-- CLR + CFG are not compatible >:{ -->
|
|
|
|
|
<ControlFlowGuard Condition="'$(CLRSupport)' == ''">Guard</ControlFlowGuard>
|
|
|
|
|
<DebugInformationFormat Condition="'%(ControlFlowGuard)' == 'Guard'">ProgramDatabase</DebugInformationFormat>
|
2023-11-22 09:52:32 -08:00
|
|
|
<SDLCheck>true</SDLCheck>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ClCompile>
|
|
|
|
|
<Link>
|
|
|
|
|
<SubSystem>Windows</SubSystem>
|
2021-07-12 13:35:57 +03:00
|
|
|
</Link>
|
2020-12-21 18:51:48 +03:00
|
|
|
<Lib>
|
|
|
|
|
<TreatLibWarningAsErrors>true</TreatLibWarningAsErrors>
|
2021-07-12 13:35:57 +03:00
|
|
|
</Lib>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ItemDefinitionGroup>
|
|
|
|
|
|
|
|
|
|
<!-- C++ source compile-specific things for Debug/Release configurations -->
|
2022-04-19 18:24:58 -04:00
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
2020-12-14 15:20:45 +03:00
|
|
|
<ClCompile>
|
|
|
|
|
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
|
<Optimization>Disabled</Optimization>
|
2025-11-12 10:39:21 +08:00
|
|
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ClCompile>
|
|
|
|
|
<Link>
|
|
|
|
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
2021-07-12 13:35:57 +03:00
|
|
|
</Link>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ItemDefinitionGroup>
|
2022-04-19 18:24:58 -04:00
|
|
|
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
2020-12-14 15:20:45 +03:00
|
|
|
<ClCompile>
|
|
|
|
|
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
|
|
|
<Optimization>MaxSpeed</Optimization>
|
2025-11-12 10:39:21 +08:00
|
|
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
2020-12-14 15:20:45 +03:00
|
|
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
|
|
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
2021-07-12 13:35:57 +03:00
|
|
|
</ClCompile>
|
2020-12-14 15:20:45 +03:00
|
|
|
<Link>
|
|
|
|
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
|
|
|
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
|
|
|
<OptimizeReferences>true</OptimizeReferences>
|
2021-07-12 13:35:57 +03:00
|
|
|
</Link>
|
2020-12-14 15:20:45 +03:00
|
|
|
</ItemDefinitionGroup>
|
|
|
|
|
|
2024-09-12 09:30:44 -07:00
|
|
|
<!-- Global props OverrideWindowsTargetPlatformVersion-->
|
|
|
|
|
<PropertyGroup Label="Globals">
|
2025-06-18 01:34:26 -07:00
|
|
|
<WindowsTargetPlatformVersion>10.0.26100.0</WindowsTargetPlatformVersion>
|
|
|
|
|
<TargetPlatformVersion>10.0.26100.0</TargetPlatformVersion>
|
2023-07-20 00:12:46 +01:00
|
|
|
<WindowsTargetPlatformMinVersion>10.0.19041.0</WindowsTargetPlatformMinVersion>
|
2020-12-14 15:20:45 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<!-- Props that are constant for both Debug and Release configurations -->
|
|
|
|
|
<PropertyGroup Label="Configuration">
|
2024-09-12 09:30:44 -07:00
|
|
|
<PlatformToolset>v143</PlatformToolset>
|
[Dev][Build] VS 2026 Support (#44304)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
This PR updates the PowerToys solution to support **Visual Studio 2026
(PlatformToolset v145)**. It centralizes the build configuration,
updates the C++ language standards, and fixes an issue with a MouseJump
unit test that appears while using the VS 2026 supported build agent.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [ ] Closes: #xxx
- [x] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [x] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [x] **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
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
**Build System & Configuration:**
- Updated `Cpp.Build.props` to use `v145` (VS 2026) as the default
`PlatformToolset`, with fall back to `v143` for VS 2022.
- Configured C++ Language Standard:
- `stdcpplatest` for production projects.
- Removed explicit `<PlatformToolset>` definitions from individual
project files (approx. 37 modules) to inherit correctly from the central
`Cpp.Build.props`.
**Code Refactoring & Fixes:**
- Updated `DrawingHelperTests.cs` in MouseJump Unit Test to ease the
pixel difference tolerance. This became an issue after switching to the
new VS2026 build agent.
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- Validated successful compilation of the entire solution. Similar
updates have been made to the .NET 10 branch, but these are much cleaner
and will be merged into that branch once fully confirmed working.
---------
Co-authored-by: Kai Tao (from Dev Box) <kaitao@microsoft.com>
Co-authored-by: Gordon Lam (SH) <yeelam@microsoft.com>
2026-01-28 18:46:34 -05:00
|
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '18.0'">v145</PlatformToolset>
|
2020-12-14 15:20:45 +03:00
|
|
|
<CharacterSet>Unicode</CharacterSet>
|
2022-08-27 02:17:20 +03:00
|
|
|
<DesktopCompatible>true</DesktopCompatible>
|
2023-11-22 09:52:32 -08:00
|
|
|
<SpectreMitigation>Spectre</SpectreMitigation>
|
2020-12-14 15:20:45 +03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<!-- Debug/Release props -->
|
2025-12-16 10:46:39 +08:00
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
2021-07-12 13:35:57 +03:00
|
|
|
<UseDebugLibraries>true</UseDebugLibraries>
|
|
|
|
|
<LinkIncremental>true</LinkIncremental>
|
|
|
|
|
</PropertyGroup>
|
2025-12-16 10:46:39 +08:00
|
|
|
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
2021-07-12 13:35:57 +03:00
|
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
|
|
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
|
|
|
<LinkIncremental>false</LinkIncremental>
|
|
|
|
|
</PropertyGroup>
|
2020-12-14 15:20:45 +03:00
|
|
|
|
2022-12-15 18:40:29 -05:00
|
|
|
</Project>
|