com.github.asus4.onnxruntime 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,46 +8,5 @@ namespace Microsoft.ML.OnnxRuntime.Editor
8
8
  public static class OrtBuildHelper
9
9
  {
10
10
  public const string PACKAGE_PATH = "Packages/com.github.asus4.onnxruntime";
11
-
12
- public static void AddDefine(NamedBuildTarget target, params string[] adds)
13
- {
14
- PlayerSettings.GetScriptingDefineSymbols(target, out string[] defines);
15
- var newDefines = defines.Concat(adds).Distinct().ToArray();
16
- PlayerSettings.SetScriptingDefineSymbols(target, newDefines);
17
- }
18
-
19
- public static void RemoveDefine(NamedBuildTarget target, params string[] removes)
20
- {
21
- PlayerSettings.GetScriptingDefineSymbols(target, out string[] defines);
22
- var newDefines = defines.Except(removes).ToArray();
23
- PlayerSettings.SetScriptingDefineSymbols(target, newDefines);
24
- }
25
-
26
- [InitializeOnLoadMethod]
27
- private static void Initialize()
28
- {
29
- RuntimePlatform platform = Application.platform;
30
- BuildTarget buildTarget = EditorUserBuildSettings.activeBuildTarget;
31
-
32
- // Debug.Log($"Initialize platform:{platform}, target{buildTarget}");
33
- if (platform == RuntimePlatform.OSXEditor)
34
- {
35
- switch (buildTarget)
36
- {
37
- case BuildTarget.StandaloneOSX:
38
- AddDefine(NamedBuildTarget.Standalone, "__ENABLE_COREML__");
39
- break;
40
- case BuildTarget.iOS:
41
- AddDefine(NamedBuildTarget.iOS, "__ENABLE_COREML__");
42
- break;
43
- case BuildTarget.Android:
44
- AddDefine(NamedBuildTarget.Android, "__ENABLE_COREML__");
45
- break;
46
- default:
47
- // Nothing
48
- break;
49
- }
50
- }
51
- }
52
11
  }
53
12
  }
@@ -24,11 +24,9 @@ namespace Microsoft.ML.OnnxRuntime.Editor
24
24
  {
25
25
  case BuildTarget.iOS:
26
26
  PostprocessBuildIOS(report);
27
- // No need to remove __ENABLE_COREML__ because is's supported on macOS as well
28
- OrtBuildHelper.RemoveDefine(NamedBuildTarget.iOS, "__IOS__");
29
27
  break;
30
28
  case BuildTarget.Android:
31
- OrtBuildHelper.RemoveDefine(NamedBuildTarget.Android, "__ANDROID__");
29
+ // Nothing to do
32
30
  break;
33
31
  // TODO: Add support for other platforms
34
32
  default:
@@ -0,0 +1,81 @@
1
+ fileFormatVersion: 2
2
+ guid: b27b30e4e87554214b41504abd9a3755
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 1
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ : Any
16
+ second:
17
+ enabled: 0
18
+ settings:
19
+ Exclude Android: 1
20
+ Exclude Editor: 0
21
+ Exclude Linux64: 0
22
+ Exclude OSXUniversal: 0
23
+ Exclude Win: 0
24
+ Exclude Win64: 0
25
+ Exclude iOS: 1
26
+ - first:
27
+ Android: Android
28
+ second:
29
+ enabled: 0
30
+ settings:
31
+ AndroidSharedLibraryType: Executable
32
+ CPU: ARMv7
33
+ - first:
34
+ Any:
35
+ second:
36
+ enabled: 0
37
+ settings: {}
38
+ - first:
39
+ Editor: Editor
40
+ second:
41
+ enabled: 1
42
+ settings:
43
+ CPU: x86_64
44
+ DefaultValueInitialized: true
45
+ OS: Linux
46
+ - first:
47
+ Standalone: Linux64
48
+ second:
49
+ enabled: 1
50
+ settings:
51
+ CPU: AnyCPU
52
+ - first:
53
+ Standalone: OSXUniversal
54
+ second:
55
+ enabled: 1
56
+ settings:
57
+ CPU: AnyCPU
58
+ - first:
59
+ Standalone: Win
60
+ second:
61
+ enabled: 1
62
+ settings:
63
+ CPU: AnyCPU
64
+ - first:
65
+ Standalone: Win64
66
+ second:
67
+ enabled: 1
68
+ settings:
69
+ CPU: AnyCPU
70
+ - first:
71
+ iPhone: iOS
72
+ second:
73
+ enabled: 0
74
+ settings:
75
+ AddToEmbeddedBinaries: false
76
+ CPU: AnyCPU
77
+ CompileFlags:
78
+ FrameworkDependencies:
79
+ userData:
80
+ assetBundleName:
81
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: c5d8c64046b444d73841eb16582662e7
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: dbd44da5c6c0e4b80b52fccdb5203789
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,81 @@
1
+ fileFormatVersion: 2
2
+ guid: ed845f30a62cb48a992c3d6e00fb3b0f
3
+ PluginImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ iconMap: {}
7
+ executionOrder: {}
8
+ defineConstraints: []
9
+ isPreloaded: 0
10
+ isOverridable: 1
11
+ isExplicitlyReferenced: 0
12
+ validateReferences: 1
13
+ platformData:
14
+ - first:
15
+ : Any
16
+ second:
17
+ enabled: 0
18
+ settings:
19
+ Exclude Android: 1
20
+ Exclude Editor: 0
21
+ Exclude Linux64: 0
22
+ Exclude OSXUniversal: 0
23
+ Exclude Win: 1
24
+ Exclude Win64: 0
25
+ Exclude iOS: 1
26
+ - first:
27
+ Android: Android
28
+ second:
29
+ enabled: 0
30
+ settings:
31
+ AndroidSharedLibraryType: Executable
32
+ CPU: ARMv7
33
+ - first:
34
+ Any:
35
+ second:
36
+ enabled: 0
37
+ settings: {}
38
+ - first:
39
+ Editor: Editor
40
+ second:
41
+ enabled: 1
42
+ settings:
43
+ CPU: x86_64
44
+ DefaultValueInitialized: true
45
+ OS: Windows
46
+ - first:
47
+ Standalone: Linux64
48
+ second:
49
+ enabled: 1
50
+ settings:
51
+ CPU: AnyCPU
52
+ - first:
53
+ Standalone: OSXUniversal
54
+ second:
55
+ enabled: 1
56
+ settings:
57
+ CPU: AnyCPU
58
+ - first:
59
+ Standalone: Win
60
+ second:
61
+ enabled: 0
62
+ settings:
63
+ CPU: AnyCPU
64
+ - first:
65
+ Standalone: Win64
66
+ second:
67
+ enabled: 1
68
+ settings:
69
+ CPU: AnyCPU
70
+ - first:
71
+ iPhone: iOS
72
+ second:
73
+ enabled: 0
74
+ settings:
75
+ AddToEmbeddedBinaries: false
76
+ CPU: AnyCPU
77
+ CompileFlags:
78
+ FrameworkDependencies:
79
+ userData:
80
+ assetBundleName:
81
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: f5b47b1d04c594cb491a2770e3095c27
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: 37684b2fa24884bd0997e89174d99413
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
@@ -1,3 +1,15 @@
1
+ // Modified for Unity
2
+ #if UNITY_ANDROID && !UNITY_EDITOR
3
+ #define __ANDROID__
4
+ #define __MOBILE__
5
+ #elif UNITY_IOS && !UNITY_EDITOR
6
+ #define __IOS__
7
+ #define __ENABLE_COREML__
8
+ #define __MOBILE__
9
+ #elif UNITY_EDITOR_OSX || UNITY_STANDALONE_OSX
10
+ #define __ENABLE_COREML__
11
+ #endif
12
+
1
13
  #if __XAMARIN__
2
14
  #if __IOS__
3
15
  [assembly: Foundation.LinkerSafe]
@@ -0,0 +1,370 @@
1
+ <Project Sdk="MSBuild.Sdk.Extras/3.0.22">
2
+ <PropertyGroup>
3
+ <!--- packaging properties -->
4
+ <OrtPackageId Condition="'$(OrtPackageId)' == ''">Microsoft.ML.OnnxRuntime</OrtPackageId>
5
+ </PropertyGroup>
6
+
7
+ <!--
8
+ Temporary setup until official Visual Studio 2022 release supports .net6, as the CIs require the official release.
9
+ We will be able to build all targets with VS once that happens.
10
+
11
+ Until then, we need to build the pre-.net6 targets with VS and the .net6 targets with dotnet.
12
+
13
+ The pre-.net6 Xamarin targets are optional and only included if the machine has the required workloads.
14
+
15
+ We have 3 scenarios
16
+ 1) Build pre-net6 targets with VS - SelectedTargets=PreNet6
17
+ 2) Build net6 targets - SelectedTargets=Net6
18
+ 3) Run 'Pack' target to create nuget package from combination of 1 and 2 - SelectedTargets=All
19
+
20
+ Default is PreNet6 so that existing projects and CI builds will do the same thing unless explicitly updated.
21
+ -->
22
+ <PropertyGroup>
23
+ <SelectedTargets>PreNet6</SelectedTargets>
24
+ <BaseTargets>netstandard2.0;netcoreapp3.1;net6.0</BaseTargets>
25
+ </PropertyGroup>
26
+
27
+ <!-- only set the Xamarin mobile targets if we're building an ORT package,
28
+ and only if the mobile workloads are installed -->
29
+ <PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
30
+ '$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu') AND
31
+ Exists('$(MSBuildExtensionsPath)\Xamarin\Android') AND
32
+ Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
33
+ <XamarinTargets>xamarinios10;monoandroid11.0</XamarinTargets>
34
+ </PropertyGroup>
35
+
36
+ <PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training') AND
37
+ Exists('$(MSBuildExtensionsPath)\Xamarin\Android')">
38
+ <XamarinTargetsForTraining>monoandroid11.0</XamarinTargetsForTraining>
39
+ </PropertyGroup>
40
+
41
+ <!-- only set the .net6 targets if we're building an ORT package.
42
+ we can add .net6 support to other packages later as needed -->
43
+ <PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
44
+ '$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Azure' OR
45
+ '$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu')">
46
+ <Net6Targets>net6.0;net6.0-android;net6.0-ios;net6.0-macos</Net6Targets>
47
+ </PropertyGroup>
48
+
49
+ <PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training')">
50
+ <Net6TargetsForTrainingPackage>net6.0;net6.0-android</Net6TargetsForTrainingPackage>
51
+ </PropertyGroup>
52
+
53
+ <PropertyGroup Condition="'$(SelectedTargets)'=='PreNet6'">
54
+ <TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining)</TargetFrameworks>
55
+ </PropertyGroup>
56
+
57
+ <PropertyGroup Condition="'$(SelectedTargets)'=='Net6'">
58
+ <TargetFrameworks>$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
59
+ </PropertyGroup>
60
+
61
+ <!-- nuget package creation -->
62
+ <PropertyGroup Condition="'$(SelectedTargets)'=='All'">
63
+ <TargetFrameworks>$(BaseTargets);$(XamarinTargets);$(XamarinTargetsForTraining);$(Net6Targets);$(Net6TargetsForTrainingPackage)</TargetFrameworks>
64
+ </PropertyGroup>
65
+
66
+
67
+ <PropertyGroup>
68
+ <Platforms>AnyCPU;x86</Platforms>
69
+ <LangVersion>default</LangVersion>
70
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
71
+ <SignAssembly>true</SignAssembly>
72
+ <AssemblyOriginatorKeyFile>..\..\OnnxRuntime.snk</AssemblyOriginatorKeyFile>
73
+
74
+ <!--internal build related properties-->
75
+ <OnnxRuntimeRoot>$(ProjectDir)..\..\..</OnnxRuntimeRoot>
76
+ <OnnxRuntimeCsharpRoot>$(OnnxRuntimeRoot)\csharp</OnnxRuntimeCsharpRoot>
77
+ <TargetArchitecture Condition=" '$(TargetArchitecture)' == '' ">x64</TargetArchitecture>
78
+
79
+ <RootNamespace>Microsoft.ML.OnnxRuntime</RootNamespace>
80
+ <AssemblyName>Microsoft.ML.OnnxRuntime</AssemblyName>
81
+ <EnableDefaultItems>false</EnableDefaultItems>
82
+ <EnableDefaultCompileItems>false</EnableDefaultCompileItems>
83
+ <DebugType>portable</DebugType>
84
+
85
+ <!-- Controls whether C# Bindings for Training are included in the Managed Nuget Package.
86
+ Bindings for training are included by default. If user tries to call training apis when the native package installed
87
+ on their device is not built for training, an exception will be thrown with the following message -
88
+ "Training is disabled in the current build. Please build onnxruntime from source with the build flags
89
+ enable_training_apis. "-->
90
+ <EnableTrainingApis Condition="'$(EnableTrainingApis)' == ''">true</EnableTrainingApis>
91
+
92
+ <!--- The package name is always hardcoded as the package created by this project only contains managed assemblies -->
93
+ <!--- The parameter OrtPackageId is only used for some conditional logic below -->
94
+ <PackageId>Microsoft.ML.OnnxRuntime.Managed</PackageId>
95
+ <Authors>Microsoft</Authors>
96
+ <PackageVersion Condition=" '$(PackageVersion)' == '' And '$(Configuration)' == 'Debug' ">1.0.0</PackageVersion>
97
+ <PackageVersion Condition=" '$(PackageVersion)' == '' ">0.0.0</PackageVersion>
98
+ <Version>$(PackageVersion)</Version>
99
+ <Description>This package contains ONNX Runtime for .Net platforms</Description>
100
+ <PackageTags>ONNX;ONNX Runtime;Machine Learning</PackageTags>
101
+ <PackageProjectUrl>https://github.com/Microsoft/onnxruntime</PackageProjectUrl>
102
+ <Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
103
+ <PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
104
+ <PackageIcon>ORT_icon_for_light_bg.png</PackageIcon>
105
+ <PackageReleaseNotes>
106
+ Release Def:
107
+ Branch: $(BUILD_SOURCEBRANCH)
108
+ Commit: $(BUILD_SOURCEVERSION)
109
+ Build: https://aiinfra.visualstudio.com/Lotus/_build/results?buildId=$(BUILD_BUILDID)
110
+ </PackageReleaseNotes>
111
+ <!-- sourcelink flags -->
112
+ <PublishRepositoryUrl>true</PublishRepositoryUrl>
113
+
114
+ <!-- Optional: Embed source files that are not tracked by the source control manager in the PDB -->
115
+ <!--EmbedUntrackedSources>true</EmbedUntrackedSources-->
116
+
117
+ <GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
118
+ <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
119
+ <AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
120
+ <Configurations>Debug;Release;RelWithDebInfo</Configurations>
121
+
122
+ <IsLinuxBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true</IsLinuxBuild>
123
+ <IsWindowsBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true</IsWindowsBuild>
124
+ <IsMacOSBuild Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true</IsMacOSBuild>
125
+
126
+ <!-- $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) gives better results than
127
+ $(TargetPlatformIdentifier). See https://github.com/dotnet/msbuild/issues/7359
128
+ Note there are slight differences in casing (e.g. macos vs macOS), so if we ever
129
+ change to use $(TargetPlatformIdentifier) we need to adjust for that.
130
+
131
+ -->
132
+ <IsXamarinTarget Condition="$(TargetFramework.StartsWith('xamarinios')) OR
133
+ $(TargetFramework.StartsWith('monoandroid'))">true</IsXamarinTarget>
134
+ <IsAndroidTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android' OR
135
+ $(TargetFramework.StartsWith('monoandroid'))">true</IsAndroidTarget>
136
+ <IsIOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR
137
+ $(TargetFramework.StartsWith('xamarinios'))">true</IsIOSTarget>
138
+ <IsMacTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos' OR
139
+ $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">true</IsMacTarget>
140
+ </PropertyGroup>
141
+
142
+ <!-- Enable training APIs for the build. The native package must be
143
+ a training build with build flag 'enable_training_apis'.
144
+ -->
145
+ <PropertyGroup Condition="'$(EnableTrainingApis)'=='true'">
146
+ <OrtConstants>$(OrtConstants);__ENABLE_TRAINING_APIS__</OrtConstants>
147
+ </PropertyGroup>
148
+
149
+ <!--
150
+ Properties that depend on the system we're building on.
151
+ -->
152
+ <PropertyGroup Condition="'$(IsLinuxBuild)'=='true'">
153
+ <!--internal build related properties for Linux -->
154
+ <OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Linux</OnnxRuntimeBuildDirectory>
155
+ <NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
156
+ </PropertyGroup>
157
+
158
+ <PropertyGroup Condition="'$(IsWindowsBuild)'=='true'">
159
+ <!--internal build related properties for Windows -->
160
+ <OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\Windows</OnnxRuntimeBuildDirectory>
161
+ <NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)\$(Configuration)</NativeBuildOutputDir>
162
+ </PropertyGroup>
163
+
164
+ <PropertyGroup Condition="'$(IsMacOSBuild)'=='true'">
165
+ <!--internal build related properties for OSX -->
166
+ <OnnxRuntimeBuildDirectory Condition="'$(OnnxRuntimeBuildDirectory)'==''">$(OnnxRuntimeCsharpRoot)\..\build\MacOS</OnnxRuntimeBuildDirectory>
167
+ <NativeBuildOutputDir>$(OnnxRuntimeBuildDirectory)\$(Configuration)</NativeBuildOutputDir>
168
+ </PropertyGroup>
169
+
170
+ <!--
171
+ Properties that depend on the target framework.
172
+ -->
173
+ <PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsAndroidTarget)'=='true'">
174
+ <OrtConstants>$(OrtConstants);__MOBILE__</OrtConstants>
175
+ </PropertyGroup>
176
+
177
+ <PropertyGroup Condition="'$(IsAndroidTarget)'=='true'">
178
+ <OrtConstants>$(OrtConstants);__ANDROID__</OrtConstants>
179
+ </PropertyGroup>
180
+
181
+ <PropertyGroup Condition="'$(IsIOSTarget)'=='true'">
182
+ <OrtConstants>$(OrtConstants);__IOS__</OrtConstants>
183
+ </PropertyGroup>
184
+
185
+ <!-- CoreML is definitely valid on iOS and macOS -->
186
+ <PropertyGroup Condition="'$(IsIOSTarget)'=='true' OR '$(IsMacTarget)'=='true'">
187
+ <OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
188
+ </PropertyGroup>
189
+
190
+ <!-- CoreML may be valid for one of these targets as they support macOS. we do a runtime check that the OS is
191
+ macOS before attempting to enable CoreML. This includes netcoreapp3.1 and net6.0
192
+ NOTE: $(TargetFrameworkIdentitier) may not be set yet, so we need to call GetTargetFrameworkIdentifier
193
+ -->
194
+ <PropertyGroup Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))=='.NETCoreApp' AND
195
+ $([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))==''">
196
+ <OrtConstants>$(OrtConstants);__ENABLE_COREML__</OrtConstants>
197
+ </PropertyGroup>
198
+
199
+ <PropertyGroup Condition="'$(IsXamarinTarget)'=='true'">
200
+ <OrtConstants>$(OrtConstants);__XAMARIN__</OrtConstants>
201
+ </PropertyGroup>
202
+
203
+ <PropertyGroup>
204
+ <DefineConstants>$(DefineConstants);$(OrtConstants)</DefineConstants>
205
+ </PropertyGroup>
206
+
207
+ <!-- debug output - makes finding/fixing any issues with the the conditions easy.
208
+ <Target Name="DumpValues" BeforeTargets="PreBuildEvent">
209
+ <Message Text="TargetPlatform='$(TargetPlatform)' TargetPlatformIdentifier='$(TargetPlatformIdentifier)' " />
210
+ <Message Text="TargetFramework='$(TargetFramework)' TargetFrameworkIdentifier='$(TargetFrameworkIdentifier)' " />
211
+ <Message Text="[MSBuild]::GetTargetPlatformIdentifier(TargetFramework)='$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))' " />
212
+ <Message Text="[MSBuild]::GetTargetFrameworkIdentifier(TargetFramework)='$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)'))' " />
213
+ <Message Text="IsMacTarget='$(IsMacTarget)' IsIOSTarget='$(IsIOSTarget)' IsAndroidTarget='$(IsAndroidTarget)' IsXamarinTarget='$(IsXamarinTarget)'" />
214
+ <Message Text="OrtConstants='$(OrtConstants)' " />
215
+ <Message Text="TargetFrameworks='$(TargetFrameworks)' " />
216
+ </Target>
217
+ -->
218
+
219
+ <ItemGroup>
220
+ <None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\session\onnxruntime_*.h"
221
+ PackagePath="\build\native\include"
222
+ Pack="false"
223
+ CopyToOutputDirectory="Never"
224
+ Visible="false"
225
+ />
226
+ <None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\cpu\cpu_provider_factory.h"
227
+ PackagePath="\build\native\include"
228
+ Pack="false"
229
+ CopyToOutputDirectory="Never"
230
+ Visible="false"
231
+ />
232
+ <None Include="$(OnnxRuntimeCsharpRoot)\..\include\onnxruntime\core\providers\dml\dml_provider_factory.h"
233
+ Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.DirectML'"
234
+ PackagePath="\build\native\include"
235
+ Pack="false"
236
+ CopyToOutputDirectory="Never"
237
+ Visible="false"
238
+ />
239
+ <None Include="$(OnnxRuntimeCsharpRoot)\..\orttraining\orttraining\training_api\include\onnxruntime_training*.h"
240
+ Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training'"
241
+ PackagePath="\build\native\include"
242
+ Pack="false"
243
+ CopyToOutputDirectory="Never"
244
+ Visible="false"
245
+ />
246
+ <None Include="$(NativeBuildOutputDir)\libonnxruntime.so"
247
+ Condition="Exists('$(NativeBuildOutputDir)\libonnxruntime.so')"
248
+ PackagePath="\runtimes\linux-$(TargetArchitecture)\native"
249
+ Pack="false"
250
+ CopyToOutputDirectory="Never"
251
+ Visible="false"
252
+ />
253
+ <None Include="$(NativeBuildOutputDir)\onnxruntime.lib"
254
+ Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.lib')"
255
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
256
+ Pack="false"
257
+ CopyToOutputDirectory="Never"
258
+ Visible="false"
259
+ />
260
+ <None Include="$(NativeBuildOutputDir)\onnxruntime.dll"
261
+ Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.dll')"
262
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
263
+ Pack="false"
264
+ CopyToOutputDirectory="PreserveNewest"
265
+ Visible="false"
266
+ />
267
+ <None Include="$(NativeBuildOutputDir)\onnxruntime.pdb"
268
+ Condition="Exists('$(NativeBuildOutputDir)\onnxruntime.pdb')"
269
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
270
+ Pack="false"
271
+ CopyToOutputDirectory="PreserveNewest"
272
+ Visible="false"
273
+ />
274
+ <None Include="$(NativeBuildOutputDir)\dnnl.dll"
275
+ Condition="Exists('$(NativeBuildOutputDir)\dnnl.dll')"
276
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
277
+ Pack="false"
278
+ CopyToOutputDirectory="PreserveNewest"
279
+ Visible="false"
280
+ />
281
+ <None Include="$(NativeBuildOutputDir)\mklml.dll"
282
+ Condition="Exists('$(NativeBuildOutputDir)\mklml.dll')"
283
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
284
+ Pack="false"
285
+ CopyToOutputDirectory="PreserveNewest"
286
+ Visible="false"
287
+ />
288
+ <None Include="$(NativeBuildOutputDir)\libiomp5md.dll"
289
+ Condition="Exists('$(NativeBuildOutputDir)\libiomp5md.dll')"
290
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
291
+ Pack="false"
292
+ CopyToOutputDirectory="PreserveNewest"
293
+ Visible="false"
294
+ />
295
+ <None Include="$(NativeBuildOutputDir)\tvm.dll"
296
+ Condition="Exists('$(NativeBuildOutputDir)\tvm.dll')"
297
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
298
+ Pack="false"
299
+ CopyToOutputDirectory="PreserveNewest"
300
+ Visible="false"
301
+ />
302
+ <None Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE.txt;$(OnnxRuntimeCsharpRoot)\..\ThirdPartyNotices.txt;$(OnnxRuntimeCsharpRoot)\..\ORT_icon_for_light_bg.png;$(OnnxRuntimeCsharpRoot)\..\docs\Privacy.md"
303
+ PackagePath="\"
304
+ Pack="true"
305
+ Visible="false"
306
+ />
307
+ <None Include="targets\netstandard\$(PackageId).targets"
308
+ PackagePath="build\netstandard2.0\$(PackageId).targets"
309
+ Pack="true"
310
+ Visible="false"
311
+ />
312
+
313
+ <!-- Some tools to be packaged in nightly build only, should not be released -->
314
+ <!-- These are copied to the runtimes folder for convenience of loading with the dlls -->
315
+ <None Include="$(NativeBuildOutputDir)\onnxruntime_perf_test.exe"
316
+ Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnxruntime_perf_test.exe')"
317
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
318
+ Pack="false"
319
+ Visible="false"
320
+ />
321
+ <None Include="$(NativeBuildOutputDir)\onnx_test_runner.exe"
322
+ Condition="('$(IsReleaseBuild)' != 'true') And ($(TargetArchitecture)=='x64') And Exists('$(NativeBuildOutputDir)\onnx_test_runner.exe')"
323
+ PackagePath="\runtimes\win-$(TargetArchitecture)\native"
324
+ Pack="false"
325
+ Visible="false"
326
+ />
327
+ </ItemGroup>
328
+
329
+ <ItemGroup>
330
+ <Compile Include="**\*.shared.cs" Link="%(Filename)%(Extension)" />
331
+ </ItemGroup>
332
+
333
+ <ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
334
+ <PackageReference Include="System.Memory" Version="4.5.5" />
335
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
336
+ <Compile Include="**\*.netstandard.cs" Link="platform\netstandard\%(Filename)%(Extension)" />
337
+ </ItemGroup>
338
+
339
+ <ItemGroup Condition=" $(TargetFramework.StartsWith('net')) AND !$(TargetFramework.StartsWith('netstandard')) ">
340
+ <PackageReference Include="System.Memory" Version="4.5.5" />
341
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
342
+ <Compile Include="**\*.net.cs" Link="platform\net\%(Filename)%(Extension)" />
343
+ </ItemGroup>
344
+
345
+ <ItemGroup Condition="$(TargetFramework.StartsWith('monoandroid'))">
346
+ <Compile Include="**\*.android.cs" Link="platform\android\%(Filename)%(Extension)" />
347
+ </ItemGroup>
348
+
349
+ <ItemGroup Condition="$(TargetFramework.StartsWith('xamarinios')) ">
350
+ <Compile Include="**\*.ios.cs" Link="platform\ios\%(Filename)%(Extension)" />
351
+ </ItemGroup>
352
+
353
+ <ItemGroup>
354
+ <LicenseFile Include="$(OnnxRuntimeCsharpRoot)\..\LICENSE" Visible="false" />
355
+ <TargetsFile Include="$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\targets.xml" Visible="false" />
356
+ </ItemGroup>
357
+
358
+ <Target Name="CopyMiscFiles" BeforeTargets="PreBuildEvent">
359
+ <Copy SourceFiles="@(LicenseFile)" DestinationFiles="@(LicenseFile->'$(OnnxRuntimeCsharpRoot)\..\%(Filename).txt')" />
360
+ <Copy SourceFiles="@(TargetsFile)" DestinationFiles="@(TargetsFile->'$(OnnxRuntimeCsharpRoot)\src\Microsoft.ML.OnnxRuntime\targets\netstandard\$(PackageId).targets')" />
361
+ </Target>
362
+
363
+ <Target Name="CopyPackage" AfterTargets="Pack">
364
+ <Copy
365
+ SourceFiles="$(OutputPath)\$(PackageId).$(PackageVersion).nupkg"
366
+ DestinationFolder="$(NativeBuildOutputDir)"
367
+ />
368
+ </Target>
369
+
370
+ </Project>
@@ -0,0 +1,7 @@
1
+ fileFormatVersion: 2
2
+ guid: 535ad42b5112c4f8f8bb41b4a67e774c
3
+ DefaultImporter:
4
+ externalObjects: {}
5
+ userData:
6
+ assetBundleName:
7
+ assetBundleVariant: