From c6e68b94953aafa90614b6805eabe81db444e271 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Wed, 18 Nov 2026 00:27:46 -0500 Subject: [PATCH] Gate ILCompiler pack version update to explicit references Backport of dotnet/runtime#130098 (80716bcbe08c2c6201dbe58ebfccf202d1d6aab3). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed0358f7-619d-4234-ba64-1b67b3ad2307 --- ...soft.DotNet.ILCompiler.SingleEntry.targets | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets index cf313984696b5f..89aae44ef7ef3d 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.DotNet.ILCompiler.SingleEntry.targets @@ -48,11 +48,21 @@ - - - $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(ILCompilerTargetsPath))))))) - - + + + <_ExplicitILCompilerPackageReference Include="@(PackageReference)" + Condition="'%(PackageReference.Identity)' == 'Microsoft.DotNet.ILCompiler' And '%(PackageReference.IsImplicitlyDefined)' != 'true'" /> + + + $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(ILCompilerTargetsPath))))))) + + + <_ExplicitILCompilerPackageReference Remove="@(_ExplicitILCompilerPackageReference)" /> + +