From bdb0b7fb6b681c82c09586d3a1a7b8d893bf9c07 Mon Sep 17 00:00:00 2001 From: Scott Lerch Date: Tue, 14 Jul 2026 16:33:26 -0700 Subject: [PATCH] Pin NativeAOT ILCompiler to 10.0.10 to match the installed .NET 10 runtime 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 --- HostsFileEditor.Cli/HostsFileEditor.Cli.csproj | 5 +++++ HostsFileEditor.Elevate/HostsFileEditor.Elevate.csproj | 8 ++++++++ HostsFileEditor.WinUI/HostsFileEditor.WinUI.csproj | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/HostsFileEditor.Cli/HostsFileEditor.Cli.csproj b/HostsFileEditor.Cli/HostsFileEditor.Cli.csproj index c59b62d..0bf1299 100644 --- a/HostsFileEditor.Cli/HostsFileEditor.Cli.csproj +++ b/HostsFileEditor.Cli/HostsFileEditor.Cli.csproj @@ -18,4 +18,9 @@ + + + + diff --git a/HostsFileEditor.Elevate/HostsFileEditor.Elevate.csproj b/HostsFileEditor.Elevate/HostsFileEditor.Elevate.csproj index 45ca99a..94be5af 100644 --- a/HostsFileEditor.Elevate/HostsFileEditor.Elevate.csproj +++ b/HostsFileEditor.Elevate/HostsFileEditor.Elevate.csproj @@ -18,4 +18,12 @@ true win-x64;win-arm64 + + + + diff --git a/HostsFileEditor.WinUI/HostsFileEditor.WinUI.csproj b/HostsFileEditor.WinUI/HostsFileEditor.WinUI.csproj index 3f4952d..1489824 100644 --- a/HostsFileEditor.WinUI/HostsFileEditor.WinUI.csproj +++ b/HostsFileEditor.WinUI/HostsFileEditor.WinUI.csproj @@ -61,6 +61,10 @@ + +