You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[msbuild] Add extra arguments for ibtool and actool. Fixes #25677. - #26641
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.
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>
⚠️error_message — When IBToolExtraArgs or ACToolExtraArgs contains an unmatched quote, this reports Unable to parse the 'AdditionalArguments' value. AdditionalArguments is only the task's internal property, not the MSBuild setting the user must fix, so the diagnostic is misleading. Pass the public property name into the helper (or use a generic localized message) so the error identifies the setting that needs correction.
Log.LogError (MSBStrings.E7132 /* Unable to parse the 'AdditionalArguments' value: {0} */, additionalArgumentsValue);
msbuild/Xamarin.Shared/Xamarin.Shared.targets:925
⚠️test_coverage — This new stamp file is the mechanism that promises changing IBToolExtraArgs invalidates the cached compiler output, but the added tests only exercise argument parsing and never build twice with a changed property. Add an incremental-build regression that verifies _CoreCompileInterfaceDefinitions reruns after IBToolExtraArgs changes (and covers the analogous ACToolExtraArgs path) so this cache invalidation cannot silently regress.
⚠️test_coverage — The ACToolExtraArgs stamp and deletion path is also new, but no test changes exercise an incremental build where this property changes and confirm _CoreCompileImageAssets reruns. Add coverage for this target in the same regression suite so stale actool outputs are detected.
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>
⚠️error_message — When a project sets IBToolExtraArgs or ACToolExtraArgs to an invalid quoted string, this reports AdditionalArguments instead of the property the user configured. That name is only the internal task parameter, so the diagnostic is misleading and cannot be searched back to either documented MSBuild property; use a tool-specific property name or a generic localized message for the public setting.
Log.LogError (MSBStrings.E7132 /* Unable to parse the 'AdditionalArguments' value: {0} */, additionalArgumentsValue);
💡 test_coverage — The new ACTool wiring is not exercised by the added tests: they invoke AppendAdditionalArguments through TestIBTool, so a regression that stops forwarding ACToolExtraArgs at this call site would still pass. Add a focused ACTool task test that verifies the generated command arguments (including a quoted value and an invalid value).
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>
⚠️error_message — This diagnostic only echoes the raw property value and drops the FormatException returned by StringUtils, so an unmatched quote is reported without the actionable “No matching quote found” reason. Keep the property name, but include ex.Message in the MSBuild error.
if (!StringUtils.TryParseArguments (additionalArgumentsValue, out var additionalArguments, out var _)) {
var propertyName = AdditionalArgumentsPropertyName ?? nameof (AdditionalArguments);
Log.LogError ("Unable to parse the '{0}' value: {1}", propertyName, additionalArgumentsValue);
return false;
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>
⚠️error_message — StringUtils returns the parse failure in ex, but this discards it, so an unmatched quote reports only the raw value and gives no explanation such as No matching quote found. Preserve ex.Message in this MSBuild error, as the other argument parsers do, so users can correct malformed quoting.
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>
⚠️error_message — TryParseArguments already returns a FormatException that distinguishes an unmatched quote from an incomplete escape, but this path discards it and logs only the raw value. Include ex.Message in E7192 (and add the corresponding resource placeholder) so a failed build gives an actionable diagnosis.
…actool. Fixes#25677. (#26714)
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
Backport of #26641.
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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
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.
Add
ACToolExtraArgsandIBToolExtraArgsMSBuild properties so applications can pass additional command-line arguments toactoolandibtool. This enables scenarios such as opting out of Xcode 27's toolchain-based Interface Builder compilation mode.Parse quoted arguments through the existing
StringUtilshelper 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