diff --git a/src/Microsoft.DotNet.Arcade.Sdk/tools/OptimizationData.targets b/src/Microsoft.DotNet.Arcade.Sdk/tools/OptimizationData.targets
index 8eb6c8cb1b5..04c9ed1a732 100644
--- a/src/Microsoft.DotNet.Arcade.Sdk/tools/OptimizationData.targets
+++ b/src/Microsoft.DotNet.Arcade.Sdk/tools/OptimizationData.targets
@@ -5,6 +5,10 @@
true
+
+ $(EnablePartialNgenOptimization)
+ partial
- -q -f -partialNGEN -minify -delete -mo "%(_AssemblyWithRawIbcData.PreviousAssemblyCopyPath)" "$([MSBuild]::ValueOrDefault('%(_AssemblyWithRawIbcData.IbcFiles)', '').Replace(';', '" "'))"
+ -q -f $(_PartialNgenArg) -minify -delete -mo "%(_AssemblyWithRawIbcData.PreviousAssemblyCopyPath)" "$([MSBuild]::ValueOrDefault('%(_AssemblyWithRawIbcData.IbcFiles)', '').Replace(';', '" "'))"
<_IbcMergeInvocation Include="%(_AssemblyWithRawIbcData.AssemblyFileName) [MergePreviousToCurrent]">
@@ -116,7 +133,7 @@
-delete to delete data previously embedded in the binary. This is a no-op for binaries produced by this build, but is needed for dependencies such as System.Reflection.Metadata.
-incremental to map data stored in the optimized binary, which comes from a previous build, to the new build of the binary.
-->
- -q -f -partialNGEN -minify -delete -mo "%(_AssemblyWithRawIbcData.OptimizeAssemblyPath)" -incremental "%(_AssemblyWithRawIbcData.PreviousAssemblyCopyPath)"
+ -q -f $(_PartialNgenArg) -minify -delete -mo "%(_AssemblyWithRawIbcData.OptimizeAssemblyPath)" -incremental "%(_AssemblyWithRawIbcData.PreviousAssemblyCopyPath)"
%(_AssemblyWithRawIbcData.OptimizeAssemblyPath)
@@ -131,7 +148,7 @@
-->
+ Condition="'@(OptimizeAssembly)' != '' and '$(EnableNgenOptimization)' == 'true' and '$(ApplyNgenOptimization)' != ''">
+
true
+
+ $(EnablePartialNgenOptimization)
+ Condition="'$(EnableNgenOptimization)' == 'true'">
@@ -45,9 +48,9 @@
-
-
-
+
+
+
<_DropServiceUrl>https://devdiv.artifacts.visualstudio.com