Repository navigation
[release/11.0.1xx] [msbuild] Restore library bundle resources on incremental builds. Fixes #27233 - #27393
Open
rolfbjarne wants to merge 1 commit into
Conversation
#27233 (#27244) Write per-assembly bundle resource item caches again, preserving the metadata needed to restore resources when unpacking is skipped. Feed restored items back into resource collection so they are available when the application bundle is recreated. Keep resource stamps and item caches in FileWrites on incremental builds, and include the caches in the unpack target outputs so missing caches trigger regeneration instead of silently dropping resources. Add task coverage for original and legacy resource metadata and empty caches, plus app-level regressions that repeatedly recreate the bundle while retaining intermediates. Fixes #27233 🤖 Pull request created by Copilot --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are reported for the referenced-library resource restoration backport.
No open issues 🎉
What changed in this PR
Backports #27244 to release/11.0.1xx, addressing #27233 by restoring referenced-library bundle resources when incremental builds skip unpacking and the application bundle is recreated.
Changes:
- Restore per-assembly resource caches with metadata for original and legacy resources.
- Reload cached resources and track caches and stamps for incremental builds and cleanup.
- Add regression coverage for missing and empty caches, metadata preservation, and repeated bundle recreation across Apple platforms.
| File | Description |
|---|---|
tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/UnpackLibraryResourcesTests.cs |
Tests cache metadata, empty caches, and resource preservation when one library’s cache is missing. |
tests/dotnet/UnitTests/ProjectTest.cs |
Tests repeated bundle recreation while retaining build intermediates. |
msbuild/Xamarin.Shared/Xamarin.Shared.targets |
Restores cached resource items and tracks cache and stamp outputs. |
msbuild/Xamarin.MacDev.Tasks/Tasks/UnpackLibraryResources.cs |
Writes per-assembly bundle resource caches and reports their paths. |
Review effort: Balanced
dalexsoto
approved these changes
Nov 19, 2026
This branch has not been deployed
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.
Write per-assembly bundle resource item caches again, preserving the metadata needed to restore resources when unpacking is skipped. Feed restored items back into resource collection so they are available when the application bundle is recreated.
Keep resource stamps and item caches in FileWrites on incremental builds, and include the caches in the unpack target outputs so missing caches trigger regeneration instead of silently dropping resources.
Add task coverage for original and legacy resource metadata and empty caches, plus app-level regressions that repeatedly recreate the bundle while retaining intermediates.
Fixes #27233
🤖 Pull request created by Copilot
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com
Backport of #27244.