diff --git a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets
index d25b30fbff4cdf..0b29604b467f72 100644
--- a/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets
+++ b/src/tasks/Crossgen2Tasks/Microsoft.NET.CrossGen.targets
@@ -51,8 +51,9 @@ Copyright (c) .NET Foundation. All rights reserved.
$(PublishReadyToRunCrossgen2ExtraArgs);--strip-debug-info
$(PublishReadyToRunCrossgen2ExtraArgs);--strip-debug-info
-
- $(PublishReadyToRunCrossgen2ExtraArgs);--instruction-set:$(PublishReadyToRunInstructionSet)
+
+ <_ReadyToRunInstructionSetArgs Condition="'$(PublishReadyToRunInstructionSet)' != ''">--instruction-set:$(PublishReadyToRunInstructionSet)
+
+
+
+
+ <_ReadyToRunCompilerArgumentsCacheFile>$(IntermediateOutputPath)$(MSBuildProjectName).ReadyToRunCompilerArguments.cache
+
+
+
+
+
+
+
+
+
+
+
+
+