[PR #3412] Fix our parallel (and repeating) builds #25353

Open
opened 2026-01-31 09:08:58 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/3412

State: closed
Merged: Yes


Summary of the Pull Request

Fix our parallel (and repeating) builds

The WAP packaging project in VS <= 16.3.7 produces a couple global
properties as part of its normal operation that cause MSBuild to flag
our projects as out-of-date and requiring a rebuild. By forcing those
properties to match the WAP values, we can get consistent builds.

One of those properties, however, is "GenerateAppxPackageOnBuild", and
WAP sets it to false. When we set that, of course, we don't get an
MSIX out of our build pipeline. Therefore, we have to break our build
into two phases -- build, then package.

This required us to change our approach to PCH deletion. A project
without a PCH is also considered out-of-date. Now, we keep all PCH
files but truncate them to 0 bytes.

TerminalApp, however, is re-linked during packaging because the Xaml
compiler emits a new generated C++ file on every build. We have to keep
those PCHs around.

This pull request also removes another source of build nondeterminism: that WpfTerminalControl was propagating TargetFramework into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level.

PR Checklist

  • Closes #(none)
  • CLA
  • Tests added/passed/did a lot of builds
  • Requires documentation to be updated
  • I've discussed this with core contributors already.

Validation Steps Performed

I ran so many freakin' builds.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/3412 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Fix our parallel (and repeating) builds The WAP packaging project in VS <= 16.3.7 produces a couple global properties as part of its normal operation that cause MSBuild to flag our projects as out-of-date and requiring a rebuild. By forcing those properties to match the WAP values, we can get consistent builds. One of those properties, however, is "GenerateAppxPackageOnBuild", and WAP sets it to *false*. When we set that, of course, we don't get an MSIX out of our build pipeline. Therefore, we have to break our build into two phases -- build, then package. This required us to change our approach to PCH deletion. A project without a PCH is *also* considered out-of-date. Now, we keep all PCH files but truncate them to 0 bytes. TerminalApp, however, is re-linked during packaging because the Xaml compiler emits a new generated C++ file on every build. We have to keep those PCHs around. This pull request also removes another source of build nondeterminism: that WpfTerminalControl was propagating `TargetFramework` into architecture-specific C++ builds. Its "Any CPU" platform has been removed from architecture builds at the solution level. ## PR Checklist * [ ] Closes #(none) * [x] CLA * [x] Tests added/passed/did a lot of builds * [ ] Requires documentation to be updated * [x] I've discussed this with core contributors already. ## Validation Steps Performed I ran so many freakin' builds.
claunia added the pull-request label 2026-01-31 09:08:58 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#25353