Repository navigation
Avoid rewriting unchanged ARM64 manifests behind Wave 18.14 - #15428
Merged
JanProvaznik merged 3 commits intoOct 30, 2026
Merged
JanProvaznik merged 3 commits into
JanProvaznik merged 3 commits into
Conversation
Write generated Win32 manifests only when their bytes change, while retaining unconditional writes when Wave 18.14 is disabled. Keep returning the generated manifest path on unchanged builds. Add task and incremental compilation regression coverage and document the opt-out. Refs dotnet#15417. Co-authored-by: Copilot App <[email protected]>
JanProvaznik
temporarily deployed
to
copilot-pat-pool
October 30, 2026 13:59 — with
GitHub Actions
Inactive
JanProvaznik
temporarily deployed
to
copilot-pat-pool
October 30, 2026 14:00 — with
GitHub Actions
Inactive
JanProvaznik
temporarily deployed
to
copilot-pat-pool
October 30, 2026 14:00 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new behavior uses Wave18_14 despite the repository being at 18.13.0, incorrectly assigning a future-version opt-out instead of the required Wave18_13.
1 open issue
What changed in this PR
This PR addresses #15417 by avoiding rewrites of unchanged ARM64 manifests, allowing MSBuild to skip compilation on subsequent unchanged builds.
Changes:
- Compares serialized manifest bytes before writing, while preserving
ManifestPath. - Gates timestamp preservation behind Wave 18.14 and documents the opt-out.
- Adds timestamp, changed-input, and repeated-build compiler checks.
| File | Description |
|---|---|
src/Tasks/AddToWin32Manifest.cs |
Writes generated manifests only when bytes differ and the wave is enabled. |
src/Tasks.UnitTests/AddToWin32Manifest_Tests.cs |
Tests timestamp preservation, opt-out behavior, changed inputs, and incremental compilation. |
src/Framework/ChangeWaves.cs |
Registers Wave 18.14. |
documentation/wiki/ChangeWaves.md |
Documents manifest timestamp preservation and its opt-out. |
Review effort: Balanced
JanProvaznik
temporarily deployed
to
copilot-pat-pool
October 30, 2026 14:25 — with
GitHub Actions
Inactive
JanProvaznik
had a problem deploying
to
copilot-pat-pool
October 30, 2026 14:25 — with
GitHub Actions
Failure
JanProvaznik
temporarily deployed
to
copilot-pat-pool
October 30, 2026 14:26 — with
GitHub Actions
Inactive
ViktorHofer
reviewed
Oct 30, 2026
Use MemoryStream.TryGetBuffer for comparison and write the populated segment directly through an unbuffered file stream. Preserve file sharing and Wave 18.14 behavior. Co-authored-by: Copilot App <[email protected]>
ViktorHofer
reviewed
Oct 30, 2026
rainersigwald
approved these changes
Oct 30, 2026
Co-authored-by: Copilot App <[email protected]>
JanProvaznik
enabled auto-merge (squash)
October 30, 2026 16:58
ViktorHofer
approved these changes
Oct 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related issue(s):
Fixes #15417
Context
With
PreferNativeArm64=true,AddToWin32Manifestrewrites its generated manifest on every build. The new timestamp makesCoreCompilerun even when the project is unchanged.Changes Made
Serialize using the existing XML writer settings and write only when the bytes differ. Keep returning
ManifestPathwhen the file is unchanged, so the compiler still receives the generated manifest path.Add Wave 18.14, task-level timestamp and changed-input coverage, and second-build compiler checks in the existing end-to-end tests. Target definitions, library behavior, and cleanup are unchanged.
Compatibility
MSBUILDDISABLEFEATURESFROMVERSION=18.14restores unconditional writes. Encoding, BOM, formatting, output paths, and task parameters are unchanged; no new diagnostics or public APIs.Testing
.\build.cmd -v quiet: passed both build stages, with existing NuGet audit warnings.dotnet build src\Tasks.UnitTests\Microsoft.Build.Tasks.UnitTests.csproj --no-restore -v:q -nr:false -p:UseSharedCompilation=false: passed.Focused tests on both runtimes:
Manifest tests: 13 passed per runtime. Change-wave tests: 20 passed per runtime. No skips.
Red/green verified by temporarily restoring the original writer: both runtimes produced the same four expected failures (two timestamp checks and two repeated-compilation checks). Restoring the fix made all 13 manifest tests pass. Timestamp unit tests use an explicitly old timestamp rather than sleeps.
The full repository test suite was not run.
Dependencies and Follow-up
None.