mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-25 02:50:42 +00:00
### Description 1. use the pool with VS2022 2. upgrade System.Memory to 4.5.5 ### Motivation and Context Solve the build error while using VS2022: `[Failure] Msbuild failed when processing the file 'D:\a\_work\1\s\csharp\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj' with message: Method not found: 'System.ReadOnlySpan`1<Char> Microsoft.IO.Path.GetFileName(System.ReadOnlySpan`1<Char>)'` Ref: https://stackoverflow.com/questions/73399777/azure-build-failing-due-to-method-not-found-system-readonlyspan1char-micros
370 lines
19 KiB
XML
370 lines
19 KiB
XML
<Project Sdk="MSBuild.Sdk.Extras/3.0.22">
|
|
<PropertyGroup>
|
|
<!--- packaging properties -->
|
|
<OrtPackageId Condition="'$(OrtPackageId)' == ''">Microsoft.ML.OnnxRuntime</OrtPackageId>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Temporary setup until official Visual Studio 2022 release supports .net6, as the CIs require the official release.
|
|
We will be able to build all targets with VS once that happens.
|
|
|
|
Until then, we need to build the pre-.net6 targets with VS and the .net6 targets with dotnet.
|
|
|
|
The pre-.net6 Xamarin targets are optional and only included if the machine has the required workloads.
|
|
|
|
We have 3 scenarios
|
|
1) Build pre-net6 targets with VS - SelectedTargets=PreNet6
|
|
2) Build net6 targets - SelectedTargets=Net6
|
|
3) Run 'Pack' target to create nuget package from combination of 1 and 2 - SelectedTargets=All
|
|
|
|
Default is PreNet6 so that existing projects and CI builds will do the same thing unless explicitly updated.
|
|
-->
|
|
<PropertyGroup>
|
|
<SelectedTargets>PreNet6</SelectedTargets>
|
|
<BaseTargets>netstandard2.0;netcoreapp3.1;net6.0</BaseTargets>
|
|
</PropertyGroup>
|
|
|
|
<!-- only set the Xamarin mobile targets if we're building an ORT package,
|
|
and only if the mobile workloads are installed -->
|
|
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
|
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu') AND
|
|
Exists('$(MSBuildExtensionsPath)\Xamarin\Android') AND
|
|
Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
|
|
<XamarinTargets>xamarinios10;monoandroid11.0</XamarinTargets>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training') AND
|
|
Exists('$(MSBuildExtensionsPath)\Xamarin\Android')">
|
|
<XamarinTargetsForTraining>monoandroid11.0</XamarinTargetsForTraining>
|
|
</PropertyGroup>
|
|
|
|
<!-- only set the .net6 targets if we're building an ORT package.
|
|
we can add .net6 support to other packages later as needed -->
|
|
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
|
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Azure' OR
|
|
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu')">
|
|
<Net6Targets>net6.0;net6.0-android;net6.0-ios;net6.0-macos</Net6Targets>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training')">
|
|
<Net6TargetsForTrainingPackage>net6.0;net6.0-android</Net6TargetsForTrainingPackage>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(SelectedTargets)'=='PreNet6'">
|
|
<TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining)</TargetFrameworks>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(SelectedTargets)'=='Net6'">
|
|
<TargetFrameworks>$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
|
|
</PropertyGroup>
|
|
|
|
<!-- nuget package creation -->
|
|
<PropertyGroup Condition="'$(SelectedTargets)'=='All'">
|
|
<TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining);$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
|
|
</PropertyGroup>
|
|
|
|
|
|
<PropertyGroup>
|
|
<Platforms>AnyCPU;x86</Platforms>
|
|
<LangVersion>default</LangVersion>
|
|
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
|
<SignAssembly>true</SignAssembly>
|
|
<AssemblyOriginatorKeyFile>..\..\OnnxRuntime.snk</AssemblyOriginatorKeyFile>
|
|
|
|
<!--internal build related properties-->
|
|
<OnnxRuntimeRoot>$(ProjectDir)..\..\..</OnnxRuntimeRoot>
|
|
<OnnxRuntimeCsharpRoot>$(OnnxRuntimeRoot)\csharp</OnnxRuntimeCsharpRoot>
|
|
<TargetArchitecture Condition=" '$(TargetArchitecture)' == '' ">x64</TargetArchitecture>
|
|
|
|
<RootNamespace>Microsoft.ML.OnnxRuntime</RootNamespace>
|
|
<AssemblyName>Microsoft.ML.OnnxRuntime</AssemblyName>
|
|
<EnableDefaultItems>false</EnableDefaultItems>
|
|
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
|
<DebugType>portable</DebugType>
|
|
|
|
<!-- Controls whether C# Bindings for Training are included in the Managed Nuget Package.
|
|
Bindings for training are included by default. If user tries to call training apis when the native package installed
|
|
on their device is not built for training, an exception will be thrown with the following message -
|
|
"Training is disabled in the current build. Please build onnxruntime from source with the build flags
|
|
enable_training_apis. "-->
|
|
<EnableTrainingApis Condition="'$(EnableTrainingApis)' == ''">true</EnableTrainingApis>
|
|
|
|
<!--- The package name is always hardcoded as the package created by this project only contains managed assemblies -->
|
|
<!--- The parameter OrtPackageId is only used for some conditional logic below -->
|
|
<PackageId>Microsoft.ML.OnnxRuntime.Managed</PackageId>
|
|
<Authors>Microsoft</Authors>
|
|
<PackageVersion Condition=" '$(PackageVersion)' == '' And '$(Configuration)' == 'Debug' ">1.0.0</PackageVersion>
|
|
<PackageVersion Condition=" '$(PackageVersion)' == '' ">0.0.0</PackageVersion>
|
|
<Version>$(PackageVersion)</Version>
|
|
<Description>This package contains ONNX Runtime for .Net platforms</Description>
|
|
<PackageTags>ONNX;ONNX Runtime;Machine Learning</PackageTags>
|
|
<PackageProjectUrl>https://github.com/Microsoft/onnxruntime</PackageProjectUrl>
|
|
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
|
|
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
|
|
<PackageIcon>ORT_icon_for_light_bg.png</PackageIcon>
|
|
<PackageReleaseNotes>
|
|
Release Def:
|
|
Branch: $(BUILD_SOURCEBRANCH)
|
|
Commit: $(BUILD_SOURCEVERSION)
|
|
Build: https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=$(BUILD_BUILDID)
|
|
</PackageReleaseNotes>
|
|
<!-- sourcelink flags -->
|
|
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
|
|
|
<!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
|
|
<!--EmbedUntrackedSources>true</EmbedUntrackedSources-->
|
|
|
|
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
|
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
|
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
|
<Configurations>Debug;Release;RelWithDebInfo</Configurations>
|
|
|
|
<IsLinuxBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinuxBuild>
|
|
<IsWindowsBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindowsBuild>
|
|
<IsMacOSBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsMacOSBuild>
|
|
|
|
<!-- $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) gives better results than
|
|
$(TargetPlatformIdentifier). See https://github.com/dotnet/msbuild/issues/7359
|
|
Note there are slight differences in casing (e.g. macos vs macOS), so if we ever
|
|
change to use $(TargetPlatformIdentifier) we need to adjust for that.
|
|
|
|
-->
|
|
<IsXamarinTarget Condition="$(TargetFramework.StartsWith('xamarinios')) OR
|
|
$(TargetFramework.StartsWith('monoandroid'))">true</IsXamarinTarget>
|
|
<IsAndroidTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' OR
|
|
$(TargetFramework.StartsWith('monoandroid'))">true</IsAndroidTarget>
|
|
<IsIOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR
|
|
$(TargetFramework.StartsWith('xamarinios'))">true</IsIOSTarget>
|
|
<IsMacTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos' OR
|
|
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">true</IsMacTarget>
|
|
</PropertyGroup>
|
|
|
|
<!-- Enable training APIs for the build. The native package must be
|
|
a training build with build flag 'enable_training_apis'.
|
|
-->
|
|
<PropertyGroup Condition="'$(EnableTrainingApis)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__ENABLE_TRAINING_APIS__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Properties that depend on the system we're building on.
|
|
-->
|
|
<PropertyGroup Condition="'$(IsLinuxBuild)'=='true'">
|
|
<!--internal build related properties for Linux -->
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Linux</OnnxRuntimeBuildDirectory>
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(IsWindowsBuild)'=='true'">
|
|
<!--internal build related properties for Windows -->
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Windows</OnnxRuntimeBuildDirectory>
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(IsMacOSBuild)'=='true'">
|
|
<!--internal build related properties for OSX -->
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\MacOS</OnnxRuntimeBuildDirectory>
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
</PropertyGroup>
|
|
|
|
<!--
|
|
Properties that depend on the target framework.
|
|
-->
|
|
<PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsAndroidTarget)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__MOBILE__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(IsAndroidTarget)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__ANDROID__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(IsIOSTarget)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__IOS__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- CoreML is definitely valid on iOS and macOS -->
|
|
<PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsMacTarget)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- CoreML may be valid for one of these targets as they support macOS. we do a runtime check that the OS is
|
|
macOS before attempting to enable CoreML. This includes netcoreapp3.1 and net6.0
|
|
NOTE: $(TargetFrameworkIdentitier) may not be set yet, so we need to call GetTargetFrameworkIdentifier
|
|
-->
|
|
<PropertyGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))=='.NETCoreApp' AND
|
|
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))==''">
|
|
<OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup Condition="'$(IsXamarinTarget)'=='true'">
|
|
<OrtConstants>$(OrtConstants);__XAMARIN__</OrtConstants>
|
|
</PropertyGroup>
|
|
|
|
<PropertyGroup>
|
|
<DefineConstants>$(DefineConstants);$(OrtConstants)</DefineConstants>
|
|
</PropertyGroup>
|
|
|
|
<!-- debug output - makes finding/fixing any issues with the the conditions easy.
|
|
<Target Name="DumpValues" BeforeTargets="PreBuildEvent">
|
|
<Message Text="TargetPlatform='$(TargetPlatform)' TargetPlatformIdentifier='$(TargetPlatformIdentifier)' " />
|
|
<Message Text="TargetFramework='$(TargetFramework)' TargetFrameworkIdentifier='$(TargetFrameworkIdentifier)' " />
|
|
<Message Text="[MSBuild]::GetTargetPlatformIdentifier(TargetFramework)='$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))' " />
|
|
<Message Text="[MSBuild]::GetTargetFrameworkIdentifier(TargetFramework)='$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))' " />
|
|
<Message Text="IsMacTarget='$(IsMacTarget)' IsIOSTarget='$(IsIOSTarget)' IsAndroidTarget='$(IsAndroidTarget)' IsXamarinTarget='$(IsXamarinTarget)'" />
|
|
<Message Text="OrtConstants='$(OrtConstants)' " />
|
|
<Message Text="TargetFrameworks='$(TargetFrameworks)' " />
|
|
</Target>
|
|
-->
|
|
|
|
<ItemGroup>
|
|
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\session\onnxruntime_*.h"
|
|
PackagePath="\build\native\include"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\cpu\cpu_provider_factory.h"
|
|
PackagePath="\build\native\include"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\dml\dml_provider_factory.h"
|
|
Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.DirectML'"
|
|
PackagePath="\build\native\include"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(OnnxRuntimeCsharpRoot)\..\orttraining\orttraining\training_api\include\onnxruntime_training*.h"
|
|
Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training'"
|
|
PackagePath="\build\native\include"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\libonnxruntime.so"
|
|
Condition="Exists('$(NativeBuildOutputDir)\libonnxruntime.so')"
|
|
PackagePath="\runtimes\linux-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\onnxruntime.lib"
|
|
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.lib')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="Never"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\onnxruntime.dll"
|
|
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.dll')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\onnxruntime.pdb"
|
|
Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.pdb')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\dnnl.dll"
|
|
Condition="Exists('$(NativeBuildOutputDir)\dnnl.dll')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\mklml.dll"
|
|
Condition="Exists('$(NativeBuildOutputDir)\mklml.dll')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\libiomp5md.dll"
|
|
Condition="Exists('$(NativeBuildOutputDir)\libiomp5md.dll')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\tvm.dll"
|
|
Condition="Exists('$(NativeBuildOutputDir)\tvm.dll')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
CopyToOutputDirectory="PreserveNewest"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE.txt;$(OnnxRuntimeCsharpRoot)\..\ThirdPartyNotices.txt;$(OnnxRuntimeCsharpRoot)\..\ORT_icon_for_light_bg.png;$(OnnxRuntimeCsharpRoot)\..\docs\Privacy.md"
|
|
PackagePath="\"
|
|
Pack="true"
|
|
Visible="false"
|
|
/>
|
|
<None Include="targets\netstandard\$(PackageId).targets"
|
|
PackagePath="build\netstandard2.0\$(PackageId).targets"
|
|
Pack="true"
|
|
Visible="false"
|
|
/>
|
|
|
|
<!-- Some tools to be packaged in nightly build only, should not be released -->
|
|
<!-- These are copied to the runtimes folder for convenience of loading with the dlls -->
|
|
<None Include="$(NativeBuildOutputDir)\onnxruntime_perf_test.exe"
|
|
Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnxruntime_perf_test.exe')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
Visible="false"
|
|
/>
|
|
<None Include="$(NativeBuildOutputDir)\onnx_test_runner.exe"
|
|
Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnx_test_runner.exe')"
|
|
PackagePath="\runtimes\win-$(TargetArchitecture)\native"
|
|
Pack="false"
|
|
Visible="false"
|
|
/>
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<Compile Include="**\*.shared.cs" Link="%(Filename)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
|
|
<PackageReference Include="System.Memory" Version="4.5.5" />
|
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
|
<Compile Include="**\*.netstandard.cs" Link="platform\netstandard\%(Filename)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition=" $(TargetFramework.StartsWith('net')) AND !$(TargetFramework.StartsWith('netstandard')) ">
|
|
<PackageReference Include="System.Memory" Version="4.5.5" />
|
|
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
|
<Compile Include="**\*.net.cs" Link="platform\net\%(Filename)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
|
|
<Compile Include="**\*.android.cs" Link="platform\android\%(Filename)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup Condition="$(TargetFramework.StartsWith('xamarinios')) ">
|
|
<Compile Include="**\*.ios.cs" Link="platform\ios\%(Filename)%(Extension)" />
|
|
</ItemGroup>
|
|
|
|
<ItemGroup>
|
|
<LicenseFile Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE" Visible="false" />
|
|
<TargetsFile Include="$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\targets.xml" Visible="false" />
|
|
</ItemGroup>
|
|
|
|
<Target Name="CopyMiscFiles" BeforeTargets="PreBuildEvent">
|
|
<Copy SourceFiles="@(LicenseFile)" DestinationFiles="@(LicenseFile->'$(OnnxRuntimeCsharpRoot)\..\%(Filename).txt')" />
|
|
<Copy SourceFiles="@(TargetsFile)" DestinationFiles="@(TargetsFile->'$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\$(PackageId).targets')" />
|
|
</Target>
|
|
|
|
<Target Name="CopyPackage" AfterTargets="Pack">
|
|
<Copy
|
|
SourceFiles="$(OutputPath)\$(PackageId).$(PackageVersion).nupkg"
|
|
DestinationFolder="$(NativeBuildOutputDir)"
|
|
/>
|
|
</Target>
|
|
|
|
</Project>
|