Browse Source

React to changes in CoreRT (#6833)

* The version was bumped to 7.0
* Configuring for trimming is temporarily more complicated (until we can update to .NET 6.0).
Michal Strehovský 3 years ago
parent
commit
2c82e22379

+ 10 - 2
frameworks/CSharp/aspnetcore-corert/PlatformBenchmarks/PlatformBenchmarks.csproj

@@ -6,7 +6,6 @@
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
 
 
     <!-- Opt out of the "easy mode" of the CoreRT compiler (http://aka.ms/OptimizeCoreRT) -->
     <!-- Opt out of the "easy mode" of the CoreRT compiler (http://aka.ms/OptimizeCoreRT) -->
-    <TrimMode>link</TrimMode>
     <IlcOptimizationPreference>Speed</IlcOptimizationPreference>
     <IlcOptimizationPreference>Speed</IlcOptimizationPreference>
     <IlcPgoOptimize>true</IlcPgoOptimize>
     <IlcPgoOptimize>true</IlcPgoOptimize>
 
 
@@ -27,6 +26,15 @@
 
 
   <ItemGroup>
   <ItemGroup>
     <PackageReference Include="Utf8Json" Version="1.3.7" />
     <PackageReference Include="Utf8Json" Version="1.3.7" />
-    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="6.0.0-*" />
+    <PackageReference Include="Microsoft.DotNet.ILCompiler" Version="7.0.0-*" />
   </ItemGroup>
   </ItemGroup>
+   
+  <Target Name="ConfigureTrimming"
+    BeforeTargets="PrepareForILLink">
+    <ItemGroup>
+      <ManagedAssemblyToLink>
+        <TrimMode>link</TrimMode>
+      </ManagedAssemblyToLink>
+    </ItemGroup>
+  </Target>
 </Project>
 </Project>