diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
index 669497220c..7033795d3e 100644
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
+++ b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
@@ -10,7 +10,8 @@
..\..\OnnxRuntime.snk
- ..\..
+ ..\..\..
+ $(OnnxRuntimeRoot)\csharp
$(OnnxRuntimeCsharpRoot)\..\build\Windows
$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)
x64
@@ -146,6 +147,15 @@
CopyToOutputDirectory="Never"
Visible="false"
/>
+
')
+ if (args.package_name == 'Microsoft.ML.OnnxRuntime.DirectML' or args.package_name == 'Microsoft.ML.OnnxRuntime') and os.path.exists(os.path.join(args.ort_build_path, args.build_config, 'dualapipartitionattribute.h')):
+ files_list.append('')
+
# Process dnll.dll
if os.path.exists(os.path.join(args.native_build_path, 'dnnl.dll')):
files_list.append('')