Revert "Add --strip-il-bodies crossgen2 arg for Apple mobile RIDs (#53947)"#54135
Conversation
…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>
There was a problem hiding this comment.
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
PublishReadyToRunCrossgen2CompositeExtraArgsconditional property assignments that used@(...)item list checks in<PropertyGroup>conditions. - Removes the
Crossgen2CompositeExtraCommandLineArgsMSBuild task parameter and the corresponding response-file emission logic fromRunReadyToRunCompiler.
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. |
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>
|
Pushed two additional commits to fix pre-existing
The remaining failure ( |
|
The fix is ready in #54143. Pick any of these PRs and proceed. I created known tracking issues to unblock the merge. |
|
@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. |
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>
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>
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>
This reverts commit 1ec3763 (PR #53947).
Reason
The changes are suspected to have caused multiple test failures on main, e.g.
AoT_Publish_HostedAppWithScopedCss_VisualStudioinMicrosoft.NET.Sdk.BlazorWebAssembly.AoT.Tests.Error: