[msbuild] Add AppManifestEntry build items. Fixes #12788 - #26240
[msbuild] Add AppManifestEntry build items. Fixes #12788#26240rolfbjarne wants to merge 6 commits into
Conversation
Allow projects to add, override, and remove Info.plist entries using typed MSBuild items. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41397aea-ecce-4a13-83fa-453adc477ec7
Hash length-prefixed AppManifestEntry metadata so arbitrary keys and values reliably invalidate incremental builds. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41397aea-ecce-4a13-83fa-453adc477ec7
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Adds typed AppManifestEntry MSBuild items to allow projects to add/override/remove Info.plist entries without generating separate partial plists, while ensuring incremental builds correctly rebuild when these items change.
Changes:
- Introduces
AppManifestEntryprocessing inCompileAppManifest(supports Remove/Boolean/String/StringArray) and wires it into the build targets with highest precedence. - Makes incremental build fingerprints collision-safe by hashing item metadata with explicit length boundaries.
- Adds localized diagnostics, task-level tests, and an end-to-end .NET build test + build-items documentation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ComputeHashForItemsTaskTests.cs | Adds a regression test ensuring hash input boundary collisions don’t produce equal hashes. |
| tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CompileAppManifestTaskTests.cs | Adds task-level coverage for applying/removing manifest entries and validating diagnostics. |
| tests/dotnet/UnitTests/PartialAppManifestTest.cs | End-to-end test verifying AppManifestEntry affects output and participates in incremental rebuilds. |
| tests/dotnet/MyPartialAppManifestApp/shared.csproj | Adds AppManifestEntry items and properties used by the end-to-end test. |
| msbuild/Xamarin.Shared/Xamarin.Shared.targets | Wires @(AppManifestEntry) into _CompileAppManifest and into incremental input fingerprints via hashing. |
| msbuild/Xamarin.MacDev.Tasks/Tasks/ComputeHashForItems.cs | Updates hashing to include explicit boundaries between metadata values to avoid collisions. |
| msbuild/Xamarin.MacDev.Tasks/Tasks/CompileAppManifest.cs | Implements AppManifestEntries support and applies entries after partial plist merge (highest precedence). |
| msbuild/Xamarin.Localization.MSBuild/MSBStrings.resx | Adds localized error messages for invalid AppManifestEntry usage. |
| docs/building-apps/build-items.md | Documents the new AppManifestEntry build item format and supported types. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Reuse typed plist item parsing for app manifest entries and custom entitlements, and restore the reusable hash buffer. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41397aea-ecce-4a13-83fa-453adc477ec7
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Parse AppManifestEntry booleans with the same strict logic as CustomEntitlements. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41397aea-ecce-4a13-83fa-453adc477ec7
Use the shared strict boolean parser directly instead of passing the same delegate from every caller. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 41397aea-ecce-4a13-83fa-453adc477ec7
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #54e745e] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 203 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Add support for adding, overriding, and removing Info.plist entries using typed
AppManifestEntryMSBuild items.The new item supports boolean, string, string-array, and removal operations. App manifest entry metadata is included in incremental build fingerprints using collision-safe hashing.
Includes task-level and end-to-end coverage, localized diagnostics, and build item documentation.
Fixes #12788
Fixes #5916
🤖 Pull request created by Copilot