diff --git a/csharp/readme.md b/csharp/readme.md index 2e301e8c1750..74572b5f1750 100644 --- a/csharp/readme.md +++ b/csharp/readme.md @@ -106,7 +106,8 @@ For example, to build a CUDA GPU package, just run: /p:TargetFrameworks=netstandard2.0 \ /p:IsLinuxBuild=true ``` -**Note**: build pure cpu development package is not supported at the moment. +**Note**: to build a pure CPU development package, you need to add `/p:OrtPackageId="Microsoft.ML.OnnxRuntime"` +to `--msbuild_extra_options`. Otherwise, it will try to create Xamarin mobile targets which may not be properly configured on your devbox. A `.nupkg` file will be produced at you build root, say, `build/Release`. diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 40180aa8bacc..4c34ebcb0c85 100644 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -2035,6 +2035,8 @@ def build_nuget_package( elif use_snpe: execution_provider = '/p:ExecutionProvider="snpe"' package_name = '/p:OrtPackageId="Microsoft.ML.OnnxRuntime.Snpe"' + elif any(map(lambda x: "OrtPackageId=" in x, msbuild_extra_options)): + pass else: # use the solution file that includes Xamarin mobile targets sln = "OnnxRuntime.CSharp.sln"