Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@
Pack="true"
Visible="false"
/>

<None Include="Microsoft.ML.OnnxRuntime.targets"
PackagePath="\build\$(TargetFramework)"
Pack="true"
Visible="false"
/>
<None Include="Microsoft.ML.OnnxRuntime.props"
PackagePath="\build\$(TargetFramework)"
Pack="true"
Visible="false"
/>

</ItemGroup>

<Target Name="ObtainPackageVersion" BeforeTargets="Build;Pack">
Expand Down
20 changes: 20 additions & 0 deletions csharp/src/Microsoft.ML.OnnxRuntime/Microsoft.ML.OnnxRuntime.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup Condition="Exists('packages.config') OR
Exists('$(MSBuildProjectName).packages.config') OR
Exists('packages.$(MSBuildProjectName).config')">
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-x64\native\onnxruntime.dll"
Condition="'$(PlatformTarget)' == 'x64'">
<Link>onnxruntime.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</None>
<None Include="$(MSBuildThisFileDirectory)..\..\runtimes\win10-x64\native\mkldnn.dll"
Condition="'$(PlatformTarget)' == 'x64'">
<Link>mkldnn.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>false</Visible>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="Microsoft_ML_OnnxRuntime_CheckPrerequisites" BeforeTargets="BeforeBuild">
<!--
Special case .NET Core portable applications. When building a portable .NET Core app,
the PlatformTarget is empty, and you don't know until runtime (i.e. which dotnet.exe)
what processor architecture will be used.
-->
<Error Condition="'$(PlatformTarget)' != 'x64' AND
('$(OutputType)' == 'Exe' OR '$(OutputType)'=='WinExe') AND
!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(PlatformTarget)' == '') AND
'$(SuppressOnnxRuntimePlatformCompatibilityError)' != 'true'"
Text="Microsoft.ML.OnnxRuntime only supports the x64 platform at this time."/>
</Target>

</Project>