mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-21 21:52:11 +00:00
* build for .net5 * only reference cswinrt for .net5 * remove netstandard2.0 references * upgrade language version * net5 * remove extra comment closure * add targetframework * set target framework * remove net* * pep8 errors * make test project build with .net windows SDK projection * disable c# builds for non-x64 builds * fix pep8 errors * disable for store build * fix tests * remove cswinrt and sdk references from package * bump cswinrt down to 1.0.1 * fix bin path Co-authored-by: Sheil Kumar <sheilk@microsoft.com>
48 lines
No EOL
2.1 KiB
XML
48 lines
No EOL
2.1 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
|
|
<PropertyGroup>
|
|
<ProjectName>Microsoft.AI.MachineLearning.Interop</ProjectName>
|
|
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
|
|
<Platform>Any CPU</Platform>
|
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
|
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">..\..\..\build\Windows</OnnxRuntimeBuildDirectory>
|
|
<BuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</BuildOutputDir>
|
|
<WindowsAIInteropOutputDir>$(BuildOutputDir)\Microsoft.AI.MachineLearning.Interop</WindowsAIInteropOutputDir>
|
|
<OutputPath>$(WindowsAIInteropOutputDir)</OutputPath>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<PackageReference Include="Microsoft.Windows.CsWinRT" Version="1.0.1" targetFramework="net5.0-windows10.0.19041.0" />
|
|
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" targetFramework="net5.0-windows10.0.19041.0" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Folder Include="Generated Files\" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="GenerateProjection" BeforeTargets="DispatchToInnerBuilds;Build;CoreCompile">
|
|
<ConvertToAbsolutePath Paths="$(OnnxRuntimeBuildDirectory)">
|
|
<Output TaskParameter="AbsolutePaths" PropertyName="OnnxRuntimeBuildDirectoryAbs" />
|
|
</ConvertToAbsolutePath>
|
|
|
|
<ItemGroup>
|
|
<WindowsAIsWinMDs Include="$(OnnxRuntimeBuildDirectoryAbs)\$(Configuration)\Microsoft.AI.MachineLearning.winmd" />
|
|
</ItemGroup>
|
|
|
|
<PropertyGroup>
|
|
<CsWinRTCommand>$(CsWinRTPath)cswinrt.exe -verbose -in local -in @(WindowsAIsWinMDs->'"%(FullPath)"', ' ') -out "$(ProjectDir)Generated Files" -include Microsoft.AI.MachineLearning</CsWinRTCommand>
|
|
</PropertyGroup>
|
|
|
|
<Message Text="Generating $(ProjectName) CS projection sources with command:" />
|
|
<Message Text="$(CsWinRTCommand)" />
|
|
<Exec Command="$(CsWinRTCommand)" />
|
|
|
|
<ItemGroup>
|
|
<Compile Include="$(ProjectDir)Generated Files/*.cs" Exclude="@(Compile)" />
|
|
</ItemGroup>
|
|
</Target>
|
|
|
|
</Project> |