onnxruntime/csharp/OnnxRuntime.CSharp.proj
Pranav Sharma 1a3ded6a7b
Add C API for free dim override, fix missing API mention in InferenceTest.cs, fix confusing print statement in perf_test. (#1884)
* Mention OrtCreateSessionFromArray in C API doc

* Add C API for free dim override

* Add C API for free dim override, fix missing API mention in InferenceTest.cs, fix confusing print statement in perf_test.

* Remaining C#files

* fix c# build

* Run the tests in blame mode. This option is helpful in isolating a problematic test causing the test host to crash.

* fix order
2019-09-23 17:58:20 -07:00

73 lines
3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
This is the master msbuild project file for all csharp components.
This is created so that the NuGet dependencies are restored before the projects are built during a CI build.
CMake creates a target to this project
-->
<Project DefaultTargets="Build">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
<DotNetExe Condition= " '$(DotNetExe)' == '' ">dotnet</DotNetExe>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="RestoreProjects" BeforeTargets="Build">
<Message Importance="High" Text="Restoring NuGet packages for CSharp projects..." />
<MSBuild Projects="src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj"
Targets="Restore"
Properties="Platform=AnyCPU"
/>
<MSBuild Projects="sample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj"
Targets="Restore"
Properties="Platform=AnyCPU"
/>
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj"
Targets="Restore"
Properties=""
/>
<MSBuild Projects="tools\Microsoft.ML.OnnxRuntime.PerfTool\Microsoft.ML.OnnxRuntime.PerfTool.csproj"
Targets="Restore"
Properties="Platform=AnyCPU"
/>
</Target>
<Target Name="Build">
<Message Importance="High" Text="Building CSharp projects..." />
<MSBuild Projects="src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj"
Targets="ObtainPackageVersion;Build"
Properties="Platform=AnyCPU"/>
<MSBuild Projects="sample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj"
Targets="Build"
Properties="Platform=AnyCPU"
/>
<MSBuild Projects="test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj"
Targets="Build"
/>
<MSBuild Projects="tools\Microsoft.ML.OnnxRuntime.PerfTool\Microsoft.ML.OnnxRuntime.PerfTool.csproj"
Targets="Build"
Properties="Platform=AnyCPU"
/>
</Target>
<Target Name="RunTest">
<Message Importance="High" Text="Running CSharp tests..." />
<Exec Command="$(DotNetExe) test test\Microsoft.ML.OnnxRuntime.Tests\Microsoft.ML.OnnxRuntime.Tests.csproj -c $(Configuration) --no-build --blame" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="OutputOfExec" />
</Exec>
</Target>
<Target Name="CreatePackage">
<Message Importance="High" Text="Bundling NuGet package ..." />
<MSBuild Projects="src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj"
Targets="ObtainPackageVersion;Pack"
Properties="NoBuild=true;Platform=AnyCPU"
/>
</Target>
</Project>