diff --git a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
index 657ac23590a..06fc4c983c6 100644
--- a/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
+++ b/src/runtime/src/coreclr/tools/aot/crossgen2/crossgen2.csproj
@@ -7,7 +7,7 @@
     <!-- Can't use NativeAOT in source build yet https://github.com/dotnet/runtime/issues/66859 -->
     <NativeAotSupported Condition="'$(DotNetBuildFromSource)' == 'true'">false</NativeAotSupported>
     <!-- Trimming is not currently working, but set the appropriate feature flags for NativeAOT -->
-    <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true'">true</PublishTrimmed>
+    <PublishTrimmed Condition="'$(NativeAotSupported)' == 'true' and '$(TargetArchitecture)' != 'riscv64'">true</PublishTrimmed>
     <RuntimeIdentifiers Condition="'$(_IsPublishing)' != 'true' and '$(DotNetBuildFromSource)' != 'true'">linux-x64;linux-musl-x64;linux-arm;linux-musl-arm;linux-arm64;linux-musl-arm64;freebsd-x64;freebsd-arm64;osx-x64;osx-arm64;win-x64;win-x86;win-arm64</RuntimeIdentifiers>
     <RuntimeIdentifiers Condition="'$(DotNetBuildFromSource)' == 'true'">$(PackageRID)</RuntimeIdentifiers>
     <SelfContained>false</SelfContained>
