Skip to content

[release/11.0.1xx-rc.2] [msbuild] Add extra arguments for ibtool and actool. Fixes #25677. - #26714

Merged
rolfbjarne merged 7 commits into
release/11.0.1xx-rc.2from
dev/rolf/backport-pr-26641-release/11.0.1xx-rc.2-2026-09-24
Sep 27, 2026
Merged

rolfbjarne merged 7 commits into
release/11.0.1xx-rc.2from
dev/rolf/backport-pr-26641-release/11.0.1xx-rc.2-2026-09-24

Conversation

@rolfbjarne

Copy link
Copy Markdown
Member

Add ACToolExtraArgs and IBToolExtraArgs MSBuild properties so applications can pass additional command-line arguments to actool and ibtool. This enables scenarios such as opting out of Xcode 27's toolchain-based Interface Builder compilation mode.

Parse quoted arguments through the existing StringUtils helper and report invalid values as MSBuild errors. Track each property's value as an incremental-build input so changing additional arguments recompiles the affected resources instead of reusing stale outputs.

Document both properties and add focused coverage for quoted and invalid argument values.

Fixes #25677.

🤖 Pull request created by Copilot


Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

Backport of #26641.

rolfbjarne and others added 6 commits September 24, 2026 18:18
Add ACToolExtraArgs and IBToolExtraArgs properties, parse and forward their values to the corresponding Xcode tools, and invalidate incremental resource caches when they change. Document the new properties and cover argument parsing.

Fixes #25677

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Follow the MSBuild task nullability convention for optional inputs and snapshot the property before parsing so netstandard flow analysis can prove it is non-null.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Include the extra-arguments stamp in IBTool's per-resource freshness check so changing IBToolExtraArgs recompiles interface definitions instead of retaining outputs produced with the previous arguments. Add focused timestamp coverage for the regression.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Run the IBTool and ACTool extra-argument stamp writers through the remote build session and copy the files back to Windows so both remote task execution and local incremental checks observe the same inputs. Improve invalid-argument diagnostics to name the public MSBuild property and add focused ACTool coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Build an asset-catalog project incrementally, change only ACToolExtraArgs, and verify that the image asset compilation target runs again and rewrites Assets.car.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Move the ibtool and actool extra-argument parse diagnostic into the shared MSBuild resource catalog so the message can be localized while preserving the public property name in the error.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 24, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Improve parse-error diagnostics and add end-to-end command-line assembly coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds ACToolExtraArgs and IBToolExtraArgs MSBuild properties for forwarding parsed arguments to actool and ibtool, with incremental-build tracking, tests, and documentation.

Changes:

  • Adds quoted-argument parsing and validation.
  • Tracks argument changes for incremental rebuilds.
  • Adds localized diagnostics, tests, and documentation.
File Reviewed changes
tests/​msbuild/​Xamarin.MacDev.Tasks.Tests/​TaskTests/​IBToolTaskTests.cs Tests IBTool argument parsing and invalidation.
tests/​msbuild/​Xamarin.MacDev.Tasks.Tests/​TaskTests/​ACToolTaskTest.cs Tests ACTool argument parsing and errors.
tests/​dotnet/​UnitTests/​AssetsTest.cs Tests incremental ACTool rebuilding.
msbuild/​Xamarin.Shared/​Xamarin.Shared.targets Wires properties and incremental inputs.
msbuild/​Xamarin.MacDev.Tasks/​Tasks/​XcodeCompilerToolTask.cs Parses and appends extra tool arguments.
msbuild/​Xamarin.MacDev.Tasks/​Tasks/​IBTool.cs Tracks IBTool argument changes.
msbuild/​Xamarin.Localization.MSBuild/​MSBStrings.resx Adds the localized parsing error.
docs/​building-apps/​build-properties.md Documents both properties.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

⚠️ AppSizeTest expected files changed ⚠️

The AppSizeTest detected changes in the expected app size files.

To update the expected files, add a comment with the following command:

/apply-gist https://gist.github.com/vs-mobiletools-engineering-service2/05198e945843c07c50a104b4f0593cf5
Updated files
  • MacOSX-CoreCLR-R2R-size.txt

Pipeline on Agent
Hash: 66d57e67bf0d5a05a6cd5659d94b05ca41ad168f [PR build]

@dalexsoto dalexsoto added the ready-to-review This PR is ready to review/merge. label Sep 25, 2026
Copilot AI review requested due to automatic review settings September 25, 2026 16:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Include the specific parsing exception message in the E7192 diagnostic.

Review effort: Lite
Findings: None

Resolved since last review (1)

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: dd78c585a78a324b790190766ae3a810b7a2e72c [PR build]

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

This comment has been minimized.

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🚀 [CI Build #dd78c58] Test results 🚀

Test results

✅ All tests passed on VSTS: test results.

🎉 All 269 tests passed 🎉

Tests counts

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 7 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 31 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 31 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 25 tests passed. [attempt 3] Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 25 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 20 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 25 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. [attempt 2] Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Tahoe (26): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Golden Gate (27): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

✅ Linux build succeeded

Pipeline on Agent
Hash: dd78c585a78a324b790190766ae3a810b7a2e72c [PR build]

@rolfbjarne
rolfbjarne merged commit 75227e2 into release/11.0.1xx-rc.2 Sep 27, 2026
56 checks passed
@rolfbjarne
rolfbjarne deleted the dev/rolf/backport-pr-26641-release/11.0.1xx-rc.2-2026-09-24 branch September 27, 2026 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backported ready-to-review This PR is ready to review/merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants