Skip to content

Commit ae91643

Browse files
committed
Add IL compiler package conditional on PublishAot.
1 parent 25c6aea commit ae91643

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@
3636
Condition=" (('$(ProjectTargetFrameworkIdentifier)' == '${DefaultNetCoreTargetFramework}') AND '${DefaultNetCoreTargetFramework}' == '$(ProjectTargetFrameworkVersion)') AND '$(TargetLatestDotNetRuntime)' != 'false' "
3737
RuntimeFrameworkVersion="${MicrosoftNETCoreAppRuntimeVersion}"
3838
TargetingPackVersion="${MicrosoftNETCoreAppRefVersion}" />
39+
40+
<PackageReference Include="Microsoft.Dotnet.ILCompiler"
41+
Condition=" '$(PublishAot)' == 'true' "
42+
Version="$(MicrosoftNETCoreAppRuntimeVersion)" />
3943
</ItemGroup>
4044

4145
<ItemGroup>
@@ -121,8 +125,8 @@
121125
<Warning Text="Requested Microsoft.AspNetCore.App v${MicrosoftAspNetCoreAppRuntimeVersion} does not exist."
122126
Condition=" !EXISTS('$(_DotNetRoot)shared\Microsoft.AspNetCore.App\${MicrosoftAspNetCoreAppRuntimeVersion}') " />
123127
</Target>
124-
125-
<!--
128+
129+
<!--
126130
Make a netstandard2.1 copy of the .net ILLinkPack to work around a trimming issue.
127131
See https://github.com/dotnet/linker/issues/3175
128132
-->

0 commit comments

Comments
 (0)