Pin NativeAOT ILCompiler to 10.0.10 to match the installed .NET 10 runtime#137
Merged
Conversation
…ntime The .NET SDK 10.0.302 still defaults the NativeAOT compiler to 10.0.9, but the self-contained runtime pack now resolves to 10.0.10 (a newer .NET 10 servicing runtime). AOT publish then fails with "Overriding System.Private.CoreLib.dll with a newer version is not supported" for every AOT project (Elevate, Cli, WinUI). Align the compiler up to the runtime by pinning Microsoft.DotNet.ILCompiler to 10.0.10 in the three AOT projects. This only affects `dotnet publish` (release builds); CI does `dotnet build`/`dotnet test`, which never invokes ILC, so the reference is inert there. Bump alongside the runtime; remove once the SDK default catches up. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Release builds (
dotnet publish/build-all.ps1 -Sign) fail during NativeAOT compilation:The .NET SDK 10.0.302 (the latest available) still defaults the NativeAOT compiler to 10.0.9, but the self-contained runtime pack now resolves to the newer 10.0.10 servicing runtime. AOT requires the two to match, so every AOT project (
Elevate,Cli,WinUI) fails to publish.The .NET SDK and Windows App SDK are both already at their latest (
10.0.302/2.2.0); this is purely the AOT compiler default lagging the runtime.Fix
Pin
Microsoft.DotNet.ILCompilerto 10.0.10 in the three AOT projects, aligning the compiler up to the runtime.dotnet publish(release/AOT builds). CI runsdotnet build+dotnet test, which never invoke ILC, so the reference is inert in CI.Elevate,Cli, andWinUIall publish clean (x64) after the change.Needed to produce the signed v1.5.2 / v1.2.2 release artifacts.
🤖 Generated with Claude Code