Skip to content

Revert "Add --strip-il-bodies crossgen2 arg for Apple mobile RIDs (#53947)"#54135

Merged
dsplaisted merged 3 commits intodotnet:mainfrom
MichaelSimons:revert-53947-strip-il-bodies
Apr 29, 2026
Merged

Revert "Add --strip-il-bodies crossgen2 arg for Apple mobile RIDs (#53947)"#54135
dsplaisted merged 3 commits intodotnet:mainfrom
MichaelSimons:revert-53947-strip-il-bodies

Conversation

@MichaelSimons
Copy link
Copy Markdown
Member

@MichaelSimons MichaelSimons commented Apr 28, 2026

This reverts commit 1ec3763 (PR #53947).

Reason

The changes are suspected to have caused multiple test failures on main, e.g. AoT_Publish_HostedAppWithScopedCss_VisualStudio in Microsoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.

Error:

error MSB4099: A reference to an item list at position 99 is not allowed in this condition ...

…tnet#53947)"

This reverts commit 1ec3763.

The reverted change used @(ItemList) references in PropertyGroup conditions
in Microsoft.NET.CrossGen.targets, which is not allowed by MSBuild (MSB4099).
This breaks all builds that evaluate this file.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 23:00
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Reverts the previously introduced --strip-il-bodies Crossgen2 argument wiring for Apple mobile RIDs in order to fix MSBuild evaluation failures (MSB4099) caused by item list references in property-level conditions.

Changes:

  • Removes PublishReadyToRunCrossgen2CompositeExtraArgs conditional property assignments that used @(...) item list checks in <PropertyGroup> conditions.
  • Removes the Crossgen2CompositeExtraCommandLineArgs MSBuild task parameter and the corresponding response-file emission logic from RunReadyToRunCompiler.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.CrossGen.targets Drops the composite-only --strip-il-bodies argument plumbing and stops passing composite-extra args to the task.
src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs Removes the task property and response-file handling for composite-only Crossgen2 extra arguments.

jjonescz and others added 2 commits April 29, 2026 06:44
These tests were missed in the original CppCli test disable (commit 60fabb7).
Same root cause: VS 2026 scout Helix images missing VCTargetsPath/Microsoft.Cpp.Default.props.

Fixes dotnet#54145

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dsplaisted
Copy link
Copy Markdown
Member

Pushed two additional commits to fix pre-existing main test failures that were causing CI to fail on this PR:

  1. efc42a72 — Cherry-picked @jjonescz's fix from Fix broken run-file test RefDirective_Duplicate #54147 for the RefDirective_Duplicate test failures. These were caused by parallel merging of RunFileTests: bring missing changes from 10.0.4xx #54087 and [automated] Merge branch 'release/10.0.4xx' => 'main' #54088 on main (see [Known Build Error] RefDirective_Duplicate test asserts Fail() #54144). This fix is also going in separately via Fix broken run-file test RefDirective_Duplicate #54147.

  2. 3b88144c — Skipped GivenThatWeWantToBuildACppCliNonLibraryProject tests (linking to [Known Build Error] CppCli tests fail with MSB4278 'Microsoft.Cpp.Default.props' #54145). These fail because the VS 2026 scout Helix image (windows.amd64.vs2026.pre.scout.open) lost VCTools after an image update — the same tests were passing on Apr 21 on the same queue. This test class was missed in the original CppCli disable/re-enable cycle (C++/CLI tests fail on VS 2026 Helix machines - MSB8020 v143 platform toolset not found #53789 / Re-enable C++/CLI, SourceLink C++, and compilation context tests now that VS 2026 Helix images include VCTools #53820). The other CppCli test classes are already skipped on main due to a merge regression from release/10.0.4xx.

The remaining failure (dotnet.Tests.dll.11 on linux — xUnit v3 Catastrophic failure: Test process did not return valid JSON) is an intermittent infrastructure issue tracked by #54146. It hit 1 of ~500 work items and did not reproduce on the latest main build. Should clear on retry.

@kotlarmilos
Copy link
Copy Markdown
Member

The fix is ready in #54143. Pick any of these PRs and proceed. I created known tracking issues to unblock the merge.

@dsplaisted dsplaisted merged commit 99750ed into dotnet:main Apr 29, 2026
22 of 24 checks passed
@dsplaisted
Copy link
Copy Markdown
Member

@kotlarmilos I've gone ahead and merged this PR to get main green ASAP. So I think you could update #54143 to undo the revert and include your fix on top of it.

kotlarmilos added a commit to kotlarmilos/sdk that referenced this pull request Apr 29, 2026
Mirror the changes from dotnet/runtime#125647.

For Apple mobile RIDs (ios-, tvos-, iossimulator-, tvossimulator-, maccatalyst-),
pass --strip-il-bodies to crossgen2 by default via PublishReadyToRunCrossgen2CompositeExtraArgs
when composite R2R is enabled (PublishReadyToRunComposite=true), controllable via the
PublishReadyToRunStripILBodies MSBuild property. The composite gate is required because
crossgen2 only accepts --strip-il-bodies in composite mode.

This re-applies dotnet#53947 (reverted in dotnet#54135) with the MSB4099 fix: the property assignments
that reference @(PublishReadyToRunPartialAssemblies) and @(PublishReadyToRunCompositeExclusions)
items are placed inside the _PrepareForReadyToRunCompilation target body so the item references
are evaluated at target time rather than at import time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kotlarmilos added a commit to kotlarmilos/sdk that referenced this pull request Apr 29, 2026
Mirror the changes from dotnet/runtime#125647.

For Apple mobile RIDs (ios-, tvos-, iossimulator-, tvossimulator-, maccatalyst-),
pass --strip-il-bodies to crossgen2 by default via PublishReadyToRunCrossgen2CompositeExtraArgs
when composite R2R is enabled (PublishReadyToRunComposite=true), controllable via the
PublishReadyToRunStripILBodies MSBuild property. The composite gate is required because
crossgen2 only accepts --strip-il-bodies in composite mode.

This re-applies dotnet#53947 (reverted in dotnet#54135) with the MSB4099 fix: the property assignments
that reference @(PublishReadyToRunPartialAssemblies) and @(PublishReadyToRunCompositeExclusions)
items are placed inside the _PrepareForReadyToRunCompilation target body so the item references
are evaluated at target time rather than at import time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kotlarmilos added a commit to kotlarmilos/sdk that referenced this pull request Apr 29, 2026
Mirror the changes from dotnet/runtime#125647.

For Apple mobile RIDs (ios-, tvos-, iossimulator-, tvossimulator-, maccatalyst-),
pass --strip-il-bodies to crossgen2 by default via PublishReadyToRunCrossgen2CompositeExtraArgs
when composite R2R is enabled (PublishReadyToRunComposite=true), controllable via the
PublishReadyToRunStripILBodies MSBuild property. The composite gate is required because
crossgen2 only accepts --strip-il-bodies in composite mode.

This re-applies dotnet#53947 (reverted in dotnet#54135) with the MSB4099 fix: the property assignments
that reference @(PublishReadyToRunPartialAssemblies) and @(PublishReadyToRunCompositeExclusions)
items are placed inside the _PrepareForReadyToRunCompilation target body so the item references
are evaluated at target time rather than at import time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants