2018-12-18 08:30:27 +00:00
|
|
|
|
<Project Sdk="Microsoft.NET.Sdk">
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<PropertyGroup>
|
|
|
|
|
|
<OnnxRuntimeRoot>$(ProjectDir)..\..\..</OnnxRuntimeRoot>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<Import Project="../Microsoft.ML.OnnxRuntime.Tests.Common/NativeLibraryInclude.props" />
|
2018-11-20 00:48:22 +00:00
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
2024-09-04 22:21:23 +00:00
|
|
|
|
<TargetFramework>net8.0</TargetFramework>
|
2018-11-20 00:48:22 +00:00
|
|
|
|
<IsPackable>false</IsPackable>
|
2021-08-26 03:59:40 +00:00
|
|
|
|
<OnnxRuntimeCsharpRoot>$(ProjectDir)..\..</OnnxRuntimeCsharpRoot>
|
2019-05-20 22:48:14 +00:00
|
|
|
|
<Platforms>AnyCPU;x86</Platforms>
|
2018-11-28 09:10:37 +00:00
|
|
|
|
<OutputPath>bin\$(Configuration)\</OutputPath>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
|
2022-11-18 18:09:47 +00:00
|
|
|
|
<ProtoSrc>$(OnnxSourceDirectory)\onnx</ProtoSrc>
|
2022-09-02 20:13:48 +00:00
|
|
|
|
<!-- following attributes were necessary for the migrated Tensor tests -->
|
2023-07-21 04:58:29 +00:00
|
|
|
|
<LangVersion>default</LangVersion>
|
2019-08-16 00:28:47 +00:00
|
|
|
|
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
2020-01-27 21:39:08 +00:00
|
|
|
|
<SignAssembly>true</SignAssembly> <!-- need signing for friend access to the internals of the Tensors assembly -->
|
2019-08-16 00:28:47 +00:00
|
|
|
|
<AssemblyOriginatorKeyFile>..\..\OnnxRuntime.snk</AssemblyOriginatorKeyFile>
|
2020-05-06 10:01:04 +00:00
|
|
|
|
<Configurations>Debug;Release;RelWithDebInfo</Configurations>
|
2019-08-16 00:28:47 +00:00
|
|
|
|
<!-- end -->
|
2022-09-02 20:13:48 +00:00
|
|
|
|
|
2022-12-05 22:54:09 +00:00
|
|
|
|
<!-- Training build property.
|
2023-04-17 16:57:23 +00:00
|
|
|
|
Should be set to true when training is enabled in onnxruntime native binary
|
|
|
|
|
|
Note: This property should be set when building the csharp solution independently.
|
|
|
|
|
|
When building using the build.py script, setting the necessary properties is handled by the script. -->
|
2022-12-05 22:54:09 +00:00
|
|
|
|
<TrainingEnabledNativeBuild Condition="'$(TrainingEnabledNativeBuild)' == ''">false</TrainingEnabledNativeBuild>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<PropertyGroup Condition="'$(TrainingEnabledNativeBuild)'=='true'">
|
|
|
|
|
|
<ExtraDefineConstants>$(ExtraDefineConstants);__TRAINING_ENABLED_NATIVE_BUILD__</ExtraDefineConstants>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
|
<DefineConstants>__NET_CORE_APP__;$(DefineConstants);$(ExtraDefineConstants)</DefineConstants>
|
2018-11-20 00:48:22 +00:00
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
2020-08-26 19:33:48 +00:00
|
|
|
|
<PropertyGroup Condition="'$(IsLinuxBuild)'=='true'">
|
|
|
|
|
|
<!--internal build related properties for Linux -->
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeRoot)\build\Linux</OnnxRuntimeBuildDirectory>
|
2020-08-26 19:33:48 +00:00
|
|
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
2021-10-27 10:07:07 +00:00
|
|
|
|
<PropertyGroup Condition="'$(IsWindowsBuild)'=='true'">
|
2020-08-26 19:33:48 +00:00
|
|
|
|
<!--internal build related properties for Windows -->
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeRoot)\build\Windows</OnnxRuntimeBuildDirectory>
|
2020-08-26 19:33:48 +00:00
|
|
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
|
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
2021-10-27 10:07:07 +00:00
|
|
|
|
<PropertyGroup Condition="'$(IsMacOSBuild)'=='true'">
|
|
|
|
|
|
<!--internal build related properties for OSX -->
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeRoot)\build\MacOS</OnnxRuntimeBuildDirectory>
|
2021-10-27 10:07:07 +00:00
|
|
|
|
<NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
|
|
|
|
|
|
</PropertyGroup>
|
2019-08-16 00:28:47 +00:00
|
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
|
<ItemGroup>
|
2024-09-03 00:08:29 +00:00
|
|
|
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
|
|
|
|
|
|
<PackageReference Include="xunit" Version="2.9.0" />
|
|
|
|
|
|
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
|
2018-11-20 00:48:22 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
2023-05-05 04:27:30 +00:00
|
|
|
|
<!--
|
2024-11-01 18:03:33 +00:00
|
|
|
|
Additional libraries that aren't copied by Microsoft.ML.OnnxRuntime.Tests.Common.csproj
|
|
|
|
|
|
|
2023-05-05 04:27:30 +00:00
|
|
|
|
NOTE: We use a wildcard for custom_op_library even though that isn't necessary, so it doesn't fail
|
|
|
|
|
|
if the custom op library isn't present, which it may not be depending on the ORT build settings.
|
|
|
|
|
|
-->
|
2018-11-20 00:48:22 +00:00
|
|
|
|
<ItemGroup>
|
2023-05-05 04:27:30 +00:00
|
|
|
|
<None Condition="'$(IsWindowsBuild)'=='true'"
|
2024-11-01 18:03:33 +00:00
|
|
|
|
Include="$(NativeBuildOutputDir)\onnxruntime_providers_*.dll;
|
2023-05-05 04:27:30 +00:00
|
|
|
|
$(NativeBuildOutputDir)\onnxruntime_providers_*.pdb;
|
|
|
|
|
|
$(NativeBuildOutputDir)\custom_op_library*.dll">
|
|
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
|
|
|
|
|
|
|
|
|
|
|
<None Condition="'$(IsLinuxBuild)'=='true'"
|
2024-11-01 18:03:33 +00:00
|
|
|
|
Include="$(NativeBuildOutputDir)\libonnxruntime_providers_*.so;
|
2023-05-05 04:27:30 +00:00
|
|
|
|
$(NativeBuildOutputDir)\libcustom_op_library*.so">
|
|
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
|
|
|
|
|
|
|
|
|
|
|
<None Condition="'$(IsMacOSBuild)'=='true'"
|
2024-11-01 18:03:33 +00:00
|
|
|
|
Include="$(NativeBuildOutputDir)\libonnxruntime_providers_*.dylib;
|
2023-05-05 04:27:30 +00:00
|
|
|
|
$(NativeBuildOutputDir)\libcustom_op_library*.dylib">
|
2021-08-26 03:59:40 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
2018-11-20 00:48:22 +00:00
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
|
|
|
|
|
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<None Include="$(OnnxRuntimeRoot)\csharp\testdata\*">
|
2021-08-26 03:59:40 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
2019-10-04 23:38:00 +00:00
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
|
|
|
|
|
|
<None Include="$(OnnxRuntimeRoot)\onnxruntime\test\testdata\custom_op_library\custom_op_test.onnx">
|
2021-08-26 03:59:40 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
2019-11-21 23:45:49 +00:00
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
|
|
|
|
|
|
<None Include="$(OnnxRuntimeRoot)\onnxruntime\test\testdata\lora\two_params_lora_model.onnx">
|
2024-10-02 17:00:43 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
|
|
|
|
|
|
<None Include="$(OnnxRuntimeRoot)\onnxruntime\test\testdata\lora\two_params_lora_model.onnx_adapter">
|
2024-10-02 17:00:43 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
|
2019-02-12 21:04:51 +00:00
|
|
|
|
<BuildEnvVars Include="OnnxRuntimeBuildDirectory=$(OnnxRuntimeBuildDirectory)" />
|
2018-11-20 00:48:22 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
2019-02-12 21:04:51 +00:00
|
|
|
|
<Target Name="DefineBuildEnvironmentVariables" BeforeTargets="Build">
|
|
|
|
|
|
<WriteLinesToFile File="$(OutputPath)\Properties.txt" Lines="@(BuildEnvVars)" Overwrite="true" />
|
|
|
|
|
|
</Target>
|
|
|
|
|
|
|
2018-11-20 00:48:22 +00:00
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" />
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
2021-10-27 10:07:07 +00:00
|
|
|
|
<!-- NOTE: The xUnit framework doesn't pickup the tests defined within the referenced Microsoft.ML.OnnxRuntime.Tests.Common project -->
|
|
|
|
|
|
<ItemGroup>
|
2023-07-17 22:21:18 +00:00
|
|
|
|
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\**\*Test.cs" />
|
|
|
|
|
|
<Compile Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\**\*Tests.cs" />
|
2022-12-05 22:54:09 +00:00
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
2024-11-01 18:03:33 +00:00
|
|
|
|
<None Include="$(OnnxRuntimeRoot)\onnxruntime\test\testdata\training_api\**\*.*">
|
2022-09-02 20:13:48 +00:00
|
|
|
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
|
|
|
|
<Visible>false</Visible>
|
|
|
|
|
|
</None>
|
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
2021-10-27 10:07:07 +00:00
|
|
|
|
<ItemGroup>
|
|
|
|
|
|
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.Tests.Common\Microsoft.ML.OnnxRuntime.Tests.Common.csproj" />
|
|
|
|
|
|
</ItemGroup>
|
2018-11-20 00:48:22 +00:00
|
|
|
|
</Project>
|