Skip to content

Disable Native AOT for SDK tools when building with the Mono runtime - #7497

Merged
mthalman merged 1 commit into
dotnet:mainfrom
mthalman:dev/mthalman/aot-mono
Jul 1, 2026
Merged

mthalman merged 1 commit into
dotnet:mainfrom
mthalman:dev/mthalman/aot-mono

Conversation

@mthalman

Copy link
Copy Markdown
Member

PR #7300 enabled PublishAot unconditionally for the aspnetcore SDK tools (dotnet-dev-certs, dotnet-user-jwts, dotnet-user-secrets and the aspnetcoretools Native AOT aggregate). Native AOT requires the CoreCLR runtime, so the Mono source-build leg
(SB_CentOSStream10_Mono_Offline_MsftSdk_x64) fails with NU1102 when it tries to restore the ILCompiler/NativeAOT packs that a Mono build never produces.

Gate AOT on the runtime flavor: when DotNetBuildUseMonoRuntime is true, skip AOT and fall back to the framework-dependent tools (the pre-#7300 behavior). CoreCLR builds -- Microsoft and source-build alike -- are unaffected and keep the AOT-compiled tools from #7300.

PR dotnet#7300 enabled PublishAot unconditionally for the aspnetcore SDK tools
(dotnet-dev-certs, dotnet-user-jwts, dotnet-user-secrets and the
aspnetcoretools Native AOT aggregate). Native AOT requires the CoreCLR
runtime, so the Mono source-build leg
(SB_CentOSStream10_Mono_Offline_MsftSdk_x64) fails with NU1102 when it
tries to restore the ILCompiler/NativeAOT packs that a Mono build never
produces.

Gate AOT on the runtime flavor: when DotNetBuildUseMonoRuntime is true,
skip AOT and fall back to the framework-dependent tools (the pre-dotnet#7300
behavior). CoreCLR builds -- Microsoft and source-build alike -- are
unaffected and keep the AOT-compiled tools from dotnet#7300.

Co-authored-by: Copilot <[email protected]>
@mthalman
mthalman requested review from a team and Copilot June 30, 2026 18:38
@dotnet-policy-service
dotnet-policy-service Bot requested review from a team June 30, 2026 18:38

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 encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@mthalman
mthalman merged commit 8050375 into dotnet:main Jul 1, 2026
11 checks passed
@mthalman
mthalman deleted the dev/mthalman/aot-mono branch July 1, 2026 17:44
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.

3 participants