diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 65ac0b791b..bf6736f6b3 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -584,12 +584,6 @@ if (onnxruntime_BUILD_SHARED_LIB)
include(onnxruntime.cmake)
endif()
-if (onnxruntime_BUILD_CSHARP)
- message(STATUS "CSharp Build is enabled")
-# set_property(GLOBAL PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "netstandard2.0")
- include(onnxruntime_csharp.cmake)
-endif()
-
# some of the tests rely on the shared libs to be
# built; hence the ordering
if (onnxruntime_BUILD_UNIT_TESTS)
@@ -610,3 +604,9 @@ if (onnxruntime_BUILD_UNIT_TESTS)
set_target_properties(gtest_main PROPERTIES FOLDER "External/GTest")
include(onnxruntime_unittests.cmake)
endif()
+
+if (onnxruntime_BUILD_CSHARP)
+ message(STATUS "CSharp Build is enabled")
+# set_property(GLOBAL PROPERTY VS_DOTNET_TARGET_FRAMEWORK_VERSION "netstandard2.0")
+ include(onnxruntime_csharp.cmake)
+endif()
diff --git a/csharp/sample/Microsoft.ML.OnnxRuntime.InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.csproj b/csharp/sample/Microsoft.ML.OnnxRuntime.InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.csproj
index ae8cb450c2..8a43842d72 100644
--- a/csharp/sample/Microsoft.ML.OnnxRuntime.InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.csproj
+++ b/csharp/sample/Microsoft.ML.OnnxRuntime.InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.csproj
@@ -22,6 +22,10 @@
Always
false
+
+ Always
+ false
+
Always
false
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
index 6e253e7a6a..1e4cdb2bc6 100644
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
+++ b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.csproj
@@ -65,6 +65,13 @@
CopyToOutputDirectory="Always"
Visible="false"
/>
+
+
+
@@ -111,6 +120,8 @@
+
+
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.props b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.props
deleted file mode 100644
index 5ccd0a3672..0000000000
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.props
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
- $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories)
-
-
- $(MSBuildThisFileDirectory)../../build/native/include/;%(AdditionalIncludeDirectories)
-
-
-
-
-
- $(MSBuildThisFileDirectory)../../runtimes/win-x64/native/onnxruntime.lib
-
-
-
-
-
- onnxruntime.dll
- PreserveNewest
- false
-
-
- mkldnn.dll
- PreserveNewest
- false
-
-
-
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.targets b/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.targets
deleted file mode 100644
index c4829504ed..0000000000
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.targets
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.Gpu.props b/csharp/src/Microsoft.ML.OnnxRuntime/props.xml
similarity index 81%
rename from csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.Gpu.props
rename to csharp/src/Microsoft.ML.OnnxRuntime/props.xml
index 5ccd0a3672..c2a3a9b4ae 100644
--- a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.Gpu.props
+++ b/csharp/src/Microsoft.ML.OnnxRuntime/props.xml
@@ -32,5 +32,12 @@
PreserveNewest
false
+
+ mklml.dll
+ PreserveNewest
+ false
+
diff --git a/csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.Gpu.targets b/csharp/src/Microsoft.ML.OnnxRuntime/targets.xml
similarity index 100%
rename from csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.Gpu.targets
rename to csharp/src/Microsoft.ML.OnnxRuntime/targets.xml