Skip to content

Commit 23eadce

Browse files
jkoritzinskywtgodbe
authored andcommitted
Update KnownILLinkPack/KnownILCompilerPack instead of using a PackageReference to Microsoft.DotNet.ILCompiler.
This uses the same mechanism that the repo already uses for updating the apphost/ref/runtime packs as well as the crossgen2 pack
1 parent 6b0b77c commit 23eadce

File tree

3 files changed

+12
-17
lines changed

3 files changed

+12
-17
lines changed

eng/testing/linker/SupportFiles/Directory.Build.targets

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,8 @@
11
<Project>
2-
3-
<PropertyGroup>
4-
<!-- Used to silence the warning caused by the workaround for https://github.com/dotnet/runtime/issues/81382 -->
5-
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
6-
</PropertyGroup>
7-
8-
<!-- needed to reference a specific version of NetCoreApp. Workaround https://github.com/dotnet/runtime/issues/81382 -->
92
<ItemGroup>
103
<FrameworkReference Update="Microsoft.NETCore.App"
114
RuntimeFrameworkVersion="$(MicrosoftNETCoreAppRefVersion)" />
125

13-
<PackageReference Include="Microsoft.DotNet.ILCompiler"
14-
Version="$(MicrosoftNETCoreAppRefVersion)" />
15-
166
<!-- Workaround when there is no vNext SDK available; copy known packs info from 9.0. -->
177
<KnownAppHostPack Include="@(KnownAppHostPack->WithMetadataValue('TargetFramework', 'net9.0'))"
188
TargetFramework="$(TargetFramework)"
@@ -64,6 +54,13 @@
6454
<AppHostRuntimeIdentifiers Condition=" '$(DotNetBuildSourceOnly)' == 'true' ">$(TargetRuntimeIdentifier)</AppHostRuntimeIdentifiers>
6555
</KnownRuntimePack>
6656

57+
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler">
58+
<ILCompilerPackVersion>$(MicrosoftNETCoreAppRefVersion)</ILCompilerPackVersion>
59+
</KnownILCompilerPack>
60+
61+
<KnownILLinkPack Update="Microsoft.NET.ILLink.Tasks">
62+
<ILLinkPackVersion>$(MicrosoftNETCoreAppRefVersion)</ILLinkPackVersion>
63+
</KnownILLinkPack>
6764
</ItemGroup>
6865

6966
<!--

eng/tools/GenerateFiles/Directory.Build.props.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,5 @@
44
<ArtifactsShippingPackagesDir>${ArtifactsShippingPackagesDir}</ArtifactsShippingPackagesDir>
55
<TreatWarningsAsErrors Condition="'$(BuildingInsideVisualStudio)' != 'true'">true</TreatWarningsAsErrors>
66
<LibNetHostAppPackVersion Condition=" '$(LibNetHostAppPackVersion)' == '' ">${LibNetHostAppPackVersion}</LibNetHostAppPackVersion>
7-
8-
<!-- Temporarily hardcoded to true -->
9-
<SuppressGenerateILCompilerExplicitPackageReferenceWarning>true</SuppressGenerateILCompilerExplicitPackageReferenceWarning>
107
</PropertyGroup>
118
</Project>

eng/tools/GenerateFiles/Directory.Build.targets.in

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@
5656
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '${DefaultNetCoreTargetFramework}') AND '${DefaultNetCoreTargetFramework}' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
5757
RuntimeFrameworkVersion="${MicrosoftNETCoreAppRefVersion}"
5858
TargetingPackVersion="${MicrosoftNETCoreAppRefVersion}" />
59-
60-
<PackageReference Include="Microsoft.DotNet.ILCompiler"
61-
Condition=" '$(PublishAot)' == 'true' "
62-
Version="${MicrosoftNETCoreAppRefVersion}" />
6359
</ItemGroup>
6460

6561
<ItemGroup>
@@ -118,6 +114,11 @@
118114
Condition=" '%(TargetFramework)' == '${DefaultNetCoreTargetFramework}' ">${MicrosoftNETCoreAppRefVersion}</ILLinkPackVersion>
119115
</KnownILLinkPack>
120116

117+
<KnownILCompilerPack Update="Microsoft.DotNet.ILCompiler">
118+
<ILCompilerPackVersion
119+
Condition="'%(TargetFramework)' == '${DefaultNetCoreTargetFramework}'">$(MicrosoftNETCoreAppRefVersion)</ILCompilerPackVersion>
120+
</KnownILCompilerPack>
121+
121122
<!-- Use the just-built ASP.NET Core shared framework if available except when building product code in servicing. -->
122123
<KnownFrameworkReference Update="Microsoft.AspNetCore.App" Condition=" $(UpdateAspNetCoreKnownFramework) ">
123124
<LatestRuntimeFrameworkVersion

0 commit comments

Comments
 (0)