Update to the net8 MAUI targets. Remove Xamarin. (#21062)
### Description <!-- Describe your changes. --> Xamarin is EOL so remove support. The MAUI targets are EOL and need updating. https://dotnet.microsoft.com/en-us/platform/support/policy/maui Other cleanups: - netcoreapp3.1 is EOL - the net6 macos target was added in the mistaken belief that was for MAUI mac support, but that is actually via the mac-catalyst target which we recently added support for. - some CIs that were using the old build setup of splitting pre-net6 targets. The ORT C# bindings csproj was updated last year and the `PreNet6` and `SelectedTargets` properties no longer exist as they were replaced by the simpler `IncludeMobileTargets` property. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Remove EOL components. #21058
|
|
@ -23,7 +23,7 @@ CMake creates a target to this project
|
|||
<IsPlatformSpecificSubPackage Condition=" '$(IsPlatformSpecificSubPackage)' == '' ">false</IsPlatformSpecificSubPackage>
|
||||
<NuSpecName Condition=" '$(NuSpecName)' == '' ">NativeNuget.nuspec</NuSpecName>
|
||||
|
||||
<!-- include Xamarin/MAUI Android and iOS target frameworks? Command line property overrides this value. -->
|
||||
<!-- include MAUI Android and iOS target frameworks? Command line property overrides this value. -->
|
||||
<IncludeMobileTargets>true</IncludeMobileTargets>
|
||||
|
||||
<!--internal build related properties-->
|
||||
|
|
|
|||
|
|
@ -10,11 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{02AADD
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj", "{2E295930-42B1-422D-925D-F07947AD8EFF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj", "{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android.csproj", "{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS.csproj", "{97B32648-1B4A-4E35-8058-B2AD7373B6E6}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Maui", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Maui\Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj", "{037242E4-7C79-401F-A19C-6824B1BB356F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp.csproj", "{1AA14958-9246-4163-9403-F650E65ADCBC}"
|
||||
EndProject
|
||||
|
|
@ -102,81 +98,6 @@ Global
|
|||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.Release|x86.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhone.Deploy.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Debug|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|Any CPU.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhone.Build.0 = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|x86.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.Release|x86.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|Any CPU.Build.0 = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhone.ActiveCfg = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhone.Build.0 = Release|iPhone
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|x86.ActiveCfg = Debug|iPhoneSimulator
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6}.RelWithDebInfo|x86.Build.0 = Debug|iPhoneSimulator
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -372,6 +293,42 @@ Global
|
|||
{7D841874-815D-43C7-9A3F-DD0AD9BA9D42}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{7D841874-815D-43C7-9A3F-DD0AD9BA9D42}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||
{7D841874-815D-43C7-9A3F-DD0AD9BA9D42}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhone.Deploy.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|iPhoneSimulator.Deploy.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Debug|x86.Deploy.0 = Debug|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhone.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.Release|x86.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhone.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|iPhoneSimulator.Deploy.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|x86.ActiveCfg = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|x86.Build.0 = Release|Any CPU
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F}.RelWithDebInfo|x86.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -379,9 +336,6 @@ Global
|
|||
GlobalSection(NestedProjects) = preSolution
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD} = {6EFBFAB8-C606-4BA4-9604-BBAF3788520D}
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{97B32648-1B4A-4E35-8058-B2AD7373B6E6} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF} = {05C85C92-A377-4F69-9EF4-44A94C9B089D}
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
|
|
@ -390,6 +344,7 @@ Global
|
|||
{772E0BB4-6B5A-4453-9F4A-034DCBB61B5C} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{30431891-3929-4394-8049-75055B92315F} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
{7D841874-815D-43C7-9A3F-DD0AD9BA9D42} = {7C7FC981-8AE7-42C6-962C-4B70D5C20C35}
|
||||
{037242E4-7C79-401F-A19C-6824B1BB356F} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C3DBDA2B-F169-4EDE-9353-858904124B75}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31613.86
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.34928.147
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "OnnxRuntime", "OnnxRuntime", "{6EFBFAB8-C606-4BA4-9604-BBAF3788520D}"
|
||||
EndProject
|
||||
|
|
@ -10,8 +10,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{02AADD
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj", "{2E295930-42B1-422D-925D-F07947AD8EFF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj", "{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp", "sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp\Microsoft.ML.OnnxRuntime.InferenceSample.NetCoreApp.csproj", "{1AA14958-9246-4163-9403-F650E65ADCBC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Perf", "Perf", "{05C85C92-A377-4F69-9EF4-44A94C9B089D}"
|
||||
|
|
@ -88,30 +86,6 @@ Global
|
|||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|Any CPU.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhone.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.ActiveCfg = Debug|Any CPU
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}.RelWithDebInfo|x86.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
|
|
@ -215,7 +189,6 @@ Global
|
|||
GlobalSection(NestedProjects) = preSolution
|
||||
{584B53B3-359D-4DC2-BCD8-530B5D4685AD} = {6EFBFAB8-C606-4BA4-9604-BBAF3788520D}
|
||||
{2E295930-42B1-422D-925D-F07947AD8EFF} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{C5BDDD5D-F811-4CDD-A977-2D8581C21F36} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{1AA14958-9246-4163-9403-F650E65ADCBC} = {02AADD56-0FD4-4F03-A56C-30529A36B0C0}
|
||||
{310506FD-6E78-4D62-989B-25D69A85E8CF} = {05C85C92-A377-4F69-9EF4-44A94C9B089D}
|
||||
{04FA49F0-AA23-4EE5-B455-6E12FFAD29E6} = {6782763B-8097-457C-AEA3-67678621DBE0}
|
||||
|
|
|
|||
|
|
@ -64,27 +64,19 @@ Add that folder to your PATH.
|
|||
|
||||
If we're starting with VS 2022 17.2.4 we should have dotnet sdk 6.0.301
|
||||
|
||||
Make sure all the required workloads are installed
|
||||
`dotnet workload install android ios maccatalyst macos`
|
||||
- original example from [here](https://github.com/Sweekriti91/maui-samples/blob/swsat/devops/6.0/Apps/WeatherTwentyOne/devops/AzureDevOps/azdo_windows.yml):
|
||||
- `dotnet workload install android ios maccatalyst macos maui --source https://aka.ms/dotnet6/nuget/index.json --source https://api.nuget.org/v3/index.json`
|
||||
- don't need 'maui' in this list until we update the sample/test apps
|
||||
- didn't seem to need --source arg/s for local build. YMMV.
|
||||
The IncludeMobileTargets property determines whether the MAUI targets are included. This is set to 'true' for the
|
||||
real package build.
|
||||
|
||||
Build pre-net6 targets
|
||||
`msbuild -t:restore .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=PreNet6`
|
||||
`msbuild -t:build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=PreNet6`
|
||||
Make sure all the required workloads are installed if the MAUI targets are included.
|
||||
`dotnet workload install maui android ios maccatalyst`
|
||||
- original example from [here](https://github.com/Sweekriti91/maui-samples/blob/swsat/devops/6.0/Apps/WeatherTwentyOne/devops/AzureDevOps/azdo_windows.yml):
|
||||
|
||||
Restore and build the managed package.
|
||||
`msbuild -t:restore .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:IncludeMobileTargets=true`
|
||||
`msbuild -t:build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:IncludeMobileTargets=true`
|
||||
|
||||
Need to run msbuild twice - once to restore which creates some json configs that are needed like
|
||||
Microsoft.ML.OnnxRuntime\obj\project.assets.json, and once to build using the configs.
|
||||
|
||||
Build net6 targets
|
||||
`dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6`
|
||||
|
||||
The dotnet build does the restore internally.
|
||||
|
||||
Create project.assets.json in obj dir with all targets so the nuget package creation includes them all
|
||||
`msbuild -t:restore .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=All`
|
||||
Microsoft.ML.OnnxRuntime\obj\project.assets.json, and once to build using those configs.
|
||||
|
||||
Create nuget package
|
||||
`msbuild .\OnnxRuntime.CSharp.proj -t:CreatePackage -p:OrtPackageId=Microsoft.ML.OnnxRuntime -p:Configuration=Debug -p:Platform="Any CPU"`
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
The main solution file is OnnxRuntime.CSharp.sln. This includes desktop and Xamarin mobile projects.
|
||||
OnnxRuntime.DesktopOnly.CSharp.sln is a copy of that with all the mobile projects removed. This is
|
||||
due to there being no way to selectively exclude a csproj from the sln if Xamarin isn't available.
|
||||
The main solution file is OnnxRuntime.CSharp.sln. This includes desktop and MAUI mobile projects.
|
||||
OnnxRuntime.DesktopOnly.CSharp.sln is a copy of that with all the mobile projects removed. This is
|
||||
due to there being no way to selectively exclude a csproj from the sln if Xamarin isn't available.
|
||||
|
||||
If changes are required, either update the main solution first and copy the relevant changes across,
|
||||
or copy the entire file and remove the mobile projects (anything with iOS, Android or Droid in the name).
|
||||
or copy the entire file and remove the mobile projects (anything with iOS, Android or Droid in the name).
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories) and given a Build Action of "AndroidAsset".
|
||||
|
||||
These files will be deployed with your package and will be accessible using Android's
|
||||
AssetManager, like this:
|
||||
|
||||
public class ReadAsset : Activity
|
||||
{
|
||||
protected override void OnCreate (Bundle bundle)
|
||||
{
|
||||
base.OnCreate (bundle);
|
||||
|
||||
InputStream input = Assets.Open ("my_asset.txt");
|
||||
}
|
||||
}
|
||||
|
||||
Additionally, some Android functions will automatically load asset files:
|
||||
|
||||
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Runtime;
|
||||
using Android.OS;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Droid
|
||||
{
|
||||
[Activity(Label = "Microsoft.ML.OnnxRuntime.InferenceSample.Forms", Icon = "@mipmap/icon",
|
||||
Theme = "@style/MainTheme", MainLauncher = true,
|
||||
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode |
|
||||
ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
|
||||
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
|
||||
{
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
{
|
||||
base.OnCreate(savedInstanceState);
|
||||
|
||||
Xamarin.Essentials.Platform.Init(this, savedInstanceState);
|
||||
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
|
||||
|
||||
// Register default session options configuration. This is optional.
|
||||
SessionOptionsContainer.Register((options) => { options.LogId = "Ort"; });
|
||||
|
||||
// Register a named session options configuration that enables NNAPI
|
||||
SessionOptionsContainer.Register("ort_with_npu", (options) => {
|
||||
options.AppendExecutionProvider_Nnapi();
|
||||
options.LogId = "Ort+Nnapi";
|
||||
});
|
||||
|
||||
LoadApplication(new App());
|
||||
}
|
||||
|
||||
public override void OnRequestPermissionsResult(int requestCode, string[] permissions,
|
||||
[GeneratedEnum] Android.Content.PM.Permission[] grantResults)
|
||||
{
|
||||
Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E5FED8FD-952F-4DB9-A5A9-2C598FAF976E}</ProjectGuid>
|
||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{c9e5eea5-ca05-42a1-839b-61506e0a37df}</TemplateGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Droid</RootNamespace>
|
||||
<AssemblyName>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android</AssemblyName>
|
||||
<Deterministic>True</Deterministic>
|
||||
<AndroidApplication>True</AndroidApplication>
|
||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<AndroidResgenClass>Resource</AndroidResgenClass>
|
||||
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
|
||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
||||
<TargetFrameworkVersion>v11.0</TargetFrameworkVersion>
|
||||
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
|
||||
<AndroidUseAapt2>true</AndroidUseAapt2>
|
||||
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG;</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidLinkMode>None</AndroidLinkMode>
|
||||
<Debugger>Xamarin</Debugger>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AndroidManagedSymbols>true</AndroidManagedSymbols>
|
||||
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MainActivity.cs" />
|
||||
<Compile Include="Resources\Resource.designer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
<None Include="Assets\AboutAssets.txt" />
|
||||
<None Include="Properties\AndroidManifest.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<AndroidResource Include="Resources\values\styles.xml" />
|
||||
<AndroidResource Include="Resources\values\colors.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-anydpi-v26\icon_round.xml" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-hdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-mdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxhdpi\launcher_foreground.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\icon.png" />
|
||||
<AndroidResource Include="Resources\mipmap-xxxhdpi\launcher_foreground.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\drawable\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj">
|
||||
<Project>{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj">
|
||||
<Project>{584B53B3-359D-4DC2-BCD8-530B5D4685AD}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" IncludeAssets="None" />
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\arm64-v8a\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\arm64-v8a\Release\libonnxruntime.so">
|
||||
<Link>libs\arm64-v8a\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\armeabi-v7a\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\armeabi-v7a\Release\libonnxruntime.so">
|
||||
<Link>libs\armeabi-v7a\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\x86\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\x86\Release\libonnxruntime.so">
|
||||
<Link>libs\x86\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
<AndroidNativeLibrary Condition=" Exists('..\..\..\..\build\Android\x86_64\Release\libonnxruntime.so') " Include="..\..\..\..\build\Android\x86_64\Release\libonnxruntime.so">
|
||||
<Link>libs\x86_64\libonnxruntime.so</Link>
|
||||
</AndroidNativeLibrary>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.onnxruntime_inferencesample_forms" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
|
||||
<application android:label="Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android" android:theme="@style/MainTheme"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.Android")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
// Add some common permissions, these can be removed if not needed
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
Images, layout descriptions, binary blobs and string dictionaries can be included
|
||||
in your application as resource files. Various Android APIs are designed to
|
||||
operate on the resource IDs instead of dealing with images, strings or binary blobs
|
||||
directly.
|
||||
|
||||
For example, a sample Android app that contains a user interface layout (main.xml),
|
||||
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
|
||||
would keep its resources in the "Resources" directory of the application:
|
||||
|
||||
Resources/
|
||||
drawable-hdpi/
|
||||
icon.png
|
||||
|
||||
drawable-ldpi/
|
||||
icon.png
|
||||
|
||||
drawable-mdpi/
|
||||
icon.png
|
||||
|
||||
layout/
|
||||
main.xml
|
||||
|
||||
values/
|
||||
strings.xml
|
||||
|
||||
In order to get the build system to recognize Android resources, set the build action to
|
||||
"AndroidResource". The native Android APIs do not operate directly with filenames, but
|
||||
instead operate on resource IDs. When you compile an Android application that uses resources,
|
||||
the build system will package the resources for distribution and generate a class called
|
||||
"Resource" that contains the tokens for each one of the resources included. For example,
|
||||
for the above Resources layout, this is what the Resource class would expose:
|
||||
|
||||
public class Resource {
|
||||
public class drawable {
|
||||
public const int icon = 0x123;
|
||||
}
|
||||
|
||||
public class layout {
|
||||
public const int main = 0x456;
|
||||
}
|
||||
|
||||
public class strings {
|
||||
public const int first_string = 0xabc;
|
||||
public const int second_string = 0xbcd;
|
||||
}
|
||||
}
|
||||
|
||||
You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
|
||||
to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
|
||||
string in the dictionary file values/strings.xml.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/launcher_background" />
|
||||
<foreground android:drawable="@mipmap/launcher_foreground" />
|
||||
</adaptive-icon>
|
||||
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
Before Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 6.9 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 51 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="launcher_background">#FFFFFF</color>
|
||||
<color name="colorPrimary">#3F51B5</color>
|
||||
<color name="colorPrimaryDark">#303F9F</color>
|
||||
<color name="colorAccent">#FF4081</color>
|
||||
</resources>
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<resources>
|
||||
|
||||
<style name="MainTheme" parent="MainTheme.Base">
|
||||
<!-- As of Xamarin.Forms 4.6 the theme has moved into the Forms binary -->
|
||||
<!-- If you want to override anything you can do that here. -->
|
||||
<!-- Underneath are a couple of entries to get you started. -->
|
||||
|
||||
<!-- Set theme colors from https://aka.ms/material-colors -->
|
||||
<!-- colorPrimary is used for the default action bar background -->
|
||||
<!--<item name="colorPrimary">#2196F3</item>-->
|
||||
<!-- colorPrimaryDark is used for the status bar -->
|
||||
<!--<item name="colorPrimaryDark">#1976D2</item>-->
|
||||
<!-- colorAccent is used as the default value for colorControlActivated
|
||||
which is used to tint widgets -->
|
||||
<!--<item name="colorAccent">#FF4081</item>-->
|
||||
</style>
|
||||
</resources>
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
using Foundation;
|
||||
using UIKit;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS
|
||||
{
|
||||
// The UIApplicationDelegate for the application. This class is responsible for launching the
|
||||
// User Interface of the application, as well as listening (and optionally responding) to
|
||||
// application events from iOS.
|
||||
[Register("AppDelegate")]
|
||||
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
|
||||
{
|
||||
//
|
||||
// This method is invoked when the application has loaded and is ready to run. In this
|
||||
// method you should instantiate the window, load the UI into it and then make the window
|
||||
// visible.
|
||||
//
|
||||
// You have 17 seconds to return from this method, or iOS will terminate your application.
|
||||
//
|
||||
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
|
||||
{
|
||||
global::Xamarin.Forms.Forms.Init();
|
||||
|
||||
#if !__NATIVE_DEPENDENCIES_EXIST__
|
||||
throw new System.Exception(
|
||||
"The requisite onnxruntime.framework file(s) were not found. " +
|
||||
"You must build the native iOS components before running this sample");
|
||||
#else
|
||||
// Register default session options configuration.
|
||||
SessionOptionsContainer.Register((sessionOptions) => { sessionOptions.LogId = "Ort"; });
|
||||
|
||||
// Register a named session options configuration that enables the CoreML EP
|
||||
SessionOptionsContainer.Register("ort_with_npu", (sessionOptions) => {
|
||||
sessionOptions.AppendExecutionProvider_CoreML(CoreMLFlags.COREML_FLAG_ONLY_ENABLE_DEVICE_WITH_ANE);
|
||||
options.LogId = "Ort+CoreML";
|
||||
});
|
||||
LoadApplication(new App());
|
||||
#endif
|
||||
|
||||
#pragma warning disable CS0162 // Unreachable code detected
|
||||
return base.FinishedLaunching(app, options);
|
||||
#pragma warning restore CS0162 // Unreachable code detected
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,117 +0,0 @@
|
|||
{
|
||||
"images": [
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "20x20",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon60.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "29x29",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon87.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "40x40",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon120.png"
|
||||
},
|
||||
{
|
||||
"scale": "3x",
|
||||
"size": "60x60",
|
||||
"idiom": "iphone",
|
||||
"filename": "Icon180.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon20.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "20x20",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon29.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "29x29",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon58.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon40.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "40x40",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon80.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon76.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "76x76",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon152.png"
|
||||
},
|
||||
{
|
||||
"scale": "2x",
|
||||
"size": "83.5x83.5",
|
||||
"idiom": "ipad",
|
||||
"filename": "Icon167.png"
|
||||
},
|
||||
{
|
||||
"scale": "1x",
|
||||
"size": "1024x1024",
|
||||
"idiom": "ios-marketing",
|
||||
"filename": "Icon1024.png"
|
||||
}
|
||||
],
|
||||
"properties": {},
|
||||
"info": {
|
||||
"version": 1,
|
||||
"author": "xcode"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 4.6 KiB |
|
Before Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 845 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 2.7 KiB |
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
|
|
@ -1,38 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.Microsoft.OnnxRuntime-InferenceSample-Forms</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</string>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/AppIcon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
using UIKit;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS
|
||||
{
|
||||
public class Application
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{97B32648-1B4A-4E35-8058-B2AD7373B6E6}</ProjectGuid>
|
||||
<ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{6143fdea-f3c2-4a09-aafa-6e230626515e}</TemplateGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS</RootNamespace>
|
||||
<IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
|
||||
<AssemblyName>Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS</AssemblyName>
|
||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
|
||||
<ProvisioningType>automatic</ProvisioningType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<AutoGenerateBindingRedirects>True</AutoGenerateBindingRedirects>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhoneSimulator\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\iPhone\Debug</OutputPath>
|
||||
<DefineConstants>DEBUG</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchDebug>true</MtouchDebug>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchInterpreter>-all</MtouchInterpreter>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<DebugType>none</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<CodesignEntitlements>Entitlements.plist</CodesignEntitlements>
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OnnxNativeFrameworkPathPhone>..\..\..\..\build\iOS\iphoneos\Release\Release-iphoneos\onnxruntime.framework</OnnxNativeFrameworkPathPhone>
|
||||
<OnnxNativeFrameworkPathSimulator>..\..\..\..\build\iOS\iphonesimulator\Release\Release-iphonesimulator\onnxruntime.framework</OnnxNativeFrameworkPathSimulator>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)' == 'iPhoneSimulator' AND Exists('$(OnnxNativeFrameworkPathSimulator)')) OR ('$(Platform)' == 'iPhone' AND Exists('$(OnnxNativeFrameworkPathPhone)'))">
|
||||
<DefineConstants>__NATIVE_DEPENDENCIES_EXIST__</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs" />
|
||||
<Compile Include="AppDelegate.cs" />
|
||||
<None Include="Entitlements.plist" />
|
||||
<None Include="Info.plist" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="Resources\LaunchScreen.storyboard" />
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon1024.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon180.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon167.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon152.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon120.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon87.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon80.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon76.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon60.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon58.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon40.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon29.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Icon20.png">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Xamarin.iOS" />
|
||||
<Reference Include="System.Numerics" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="('$(Platform)' == 'iPhoneSimulator' AND Exists('$(OnnxNativeFrameworkPathSimulator)')) OR ('$(Platform)' == 'iPhone' AND Exists('$(OnnxNativeFrameworkPathPhone)'))">
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample.Forms\Microsoft.ML.OnnxRuntime.InferenceSample.Forms.csproj">
|
||||
<Project>{C5BDDD5D-F811-4CDD-A977-2D8581C21F36}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime.InferenceSample.Forms</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj">
|
||||
<Project>{584B53B3-359D-4DC2-BCD8-530B5D4685AD}</Project>
|
||||
<Name>Microsoft.ML.OnnxRuntime</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.5" IncludeAssets="None" />
|
||||
<NativeReference Condition=" '$(Platform)' == 'iPhoneSimulator' And Exists('$(OnnxNativeFrameworkPathSimulator)') " Include="$(OnnxNativeFrameworkPathSimulator)">
|
||||
<Kind>Framework</Kind>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<IsCxx>True</IsCxx>
|
||||
</NativeReference>
|
||||
<NativeReference Condition=" '$(Platform)' == 'iPhone' And Exists('$(OnnxNativeFrameworkPathPhone)') " Include="$(OnnxNativeFrameworkPathPhone)">
|
||||
<Kind>Framework</Kind>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<IsCxx>True</IsCxx>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Microsoft.ML.OnnxRuntime.InferenceSample.Forms.iOS")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
Before Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 7.1 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
|
@ -1,39 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="X5k-f2-b5h">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="gAE-YM-kbH">
|
||||
<objects>
|
||||
<viewController id="X5k-f2-b5h" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Y8P-hJ-Z43"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="9ZL-r4-8FZ"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="yd7-JS-zBw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" misplaced="YES" image="Icon-60.png" translatesAutoresizingMaskIntoConstraints="NO" id="23">
|
||||
<rect key="frame" x="270" y="270" width="60" height="60"/>
|
||||
<rect key="contentStretch" x="0.0" y="0.0" width="0.0" height="0.0"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.20392156862745098" green="0.59607843137254901" blue="0.85882352941176465" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="23" firstAttribute="centerY" secondItem="yd7-JS-zBw" secondAttribute="centerY" priority="1" id="39"/>
|
||||
<constraint firstItem="23" firstAttribute="centerX" secondItem="yd7-JS-zBw" secondAttribute="centerX" priority="1" id="41"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="XAI-xm-WK6" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="349" y="339"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="Icon-60.png" width="180" height="180"/>
|
||||
</resources>
|
||||
</document>
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<Application xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Microsoft.ML.OnnxRuntime.InferenceSample.Forms.App">
|
||||
<Application.Resources>
|
||||
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
using Xamarin.Forms;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
MainPage = new MainPage();
|
||||
}
|
||||
|
||||
protected override void OnStart() {}
|
||||
|
||||
protected override void OnSleep() {}
|
||||
|
||||
protected override void OnResume() {}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
using Xamarin.Forms.Xaml;
|
||||
|
||||
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="Microsoft.ML.OnnxRuntime.InferenceSample.Forms.MainPage">
|
||||
|
||||
<StackLayout>
|
||||
<Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0">
|
||||
<Label Text="Inference Sample" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/>
|
||||
</Frame>
|
||||
<Label Text="ONNX Runtime" FontSize="Title" Padding="30,10,30,10"/>
|
||||
<Button x:Name="Start" Text="Run tests" Clicked="Start_Clicked" FontSize="Large" />
|
||||
<Label x:Name="OutputLabel" Text="Output" FontSize="Small"/>
|
||||
</StackLayout>
|
||||
|
||||
</ContentPage>
|
||||
|
|
@ -1,88 +0,0 @@
|
|||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Microsoft.ML.OnnxRuntime.InferenceSample.Forms
|
||||
{
|
||||
public partial class MainPage : ContentPage
|
||||
{
|
||||
public MainPage()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
// in general create the inference session (which loads and optimizes the model) once and not per inference
|
||||
// as it can be expensive and time consuming.
|
||||
inferenceSampleApi = new InferenceSampleApi();
|
||||
}
|
||||
|
||||
protected override void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
||||
OutputLabel.Text = "Press 'Run Tests'.\n";
|
||||
}
|
||||
|
||||
private readonly InferenceSampleApi inferenceSampleApi;
|
||||
|
||||
private async Task ExecuteTests()
|
||||
{
|
||||
Action<Label, string> addOutput = (label, text) =>
|
||||
{
|
||||
Device.BeginInvokeOnMainThread(() => { label.Text += text; });
|
||||
Console.Write(text);
|
||||
};
|
||||
|
||||
OutputLabel.Text = "Testing execution\nComplete output is written to Console in this trivial example.\n\n";
|
||||
|
||||
// run the testing in a background thread so updates to the UI aren't blocked
|
||||
await Task.Run(() =>
|
||||
{
|
||||
addOutput(OutputLabel, "Testing using default platform-specific session options... ");
|
||||
inferenceSampleApi.Execute();
|
||||
addOutput(OutputLabel, "done.\n");
|
||||
Thread.Sleep(1000); // artificial delay so the UI updates gradually
|
||||
|
||||
// demonstrate a range of usages by recreating the inference session with different session options.
|
||||
addOutput(OutputLabel, "Testing using default platform-specific session options... ");
|
||||
inferenceSampleApi.CreateInferenceSession(SessionOptionsContainer.Create());
|
||||
inferenceSampleApi.Execute();
|
||||
addOutput(OutputLabel, "done.\n");
|
||||
Thread.Sleep(1000);
|
||||
|
||||
addOutput(OutputLabel, "Testing using named platform-specific session options... ");
|
||||
inferenceSampleApi.CreateInferenceSession(SessionOptionsContainer.Create("ort_with_npu"));
|
||||
inferenceSampleApi.Execute();
|
||||
addOutput(OutputLabel, "done.\n");
|
||||
Thread.Sleep(1000);
|
||||
|
||||
addOutput(OutputLabel, "Testing using default platform-specific session options via ApplyConfiguration extension... ");
|
||||
inferenceSampleApi.CreateInferenceSession(new SessionOptions().ApplyConfiguration());
|
||||
inferenceSampleApi.Execute();
|
||||
addOutput(OutputLabel, "done.\n");
|
||||
Thread.Sleep(1000);
|
||||
|
||||
addOutput(OutputLabel, "Testing using named platform-specific session options via ApplyConfiguration extension... ");
|
||||
inferenceSampleApi.CreateInferenceSession(new SessionOptions().ApplyConfiguration("ort_with_npu"));
|
||||
inferenceSampleApi.Execute();
|
||||
addOutput(OutputLabel, "done.\n\n");
|
||||
Thread.Sleep(1000);
|
||||
});
|
||||
|
||||
addOutput(OutputLabel, "Testing successfully completed! See the Console log for more info.");
|
||||
}
|
||||
|
||||
private async void Start_Clicked(object sender, EventArgs e)
|
||||
{
|
||||
await ExecuteTests()
|
||||
.ContinueWith(
|
||||
(task) =>
|
||||
{
|
||||
if (task.IsFaulted)
|
||||
MainThread.BeginInvokeOnMainThread(() => DisplayAlert("Error", task.Exception.Message, "OK"));
|
||||
})
|
||||
.ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<DebugType>portable</DebugType>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.ML.OnnxRuntime.InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<!-- note net6.0-maccatalyst is not supported currently. requires a new native build to be added. -->
|
||||
<TargetFrameworks>net6.0-android;net6.0-ios</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Microsoft.ML.OnnxRuntime.InferenceSample.Maui</RootNamespace>
|
||||
<UseMaui>true</UseMaui>
|
||||
|
|
@ -23,20 +23,14 @@
|
|||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">29.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
|
||||
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
|
||||
<DefaultLanguage>en</DefaultLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- set ORT SelectedTargets to include .net6 target frameworks -->
|
||||
<PropertyGroup>
|
||||
<SelectedTargets>All</SelectedTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- NOTE:
|
||||
<!-- NOTE:
|
||||
You need to manually put builds from other platforms such as Android in the correct place for this to work for cross-platform
|
||||
builds such as running in the Android simulator.
|
||||
The 'correct' place is defined by the OnnxRuntimeBuildDirectory property in Microsoft.ML.OnnxRuntime.csproj
|
||||
|
|
|
|||
|
|
@ -1,27 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31611.283
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.ML.OnnxRuntime.InferenceSample.Maui", "Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj", "{00338B12-B291-43A6-9F54-0174660FB70E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{00338B12-B291-43A6-9F54-0174660FB70E}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,17 +1,5 @@
|
|||
MAUI app that is used directly with the C# bindings project to do some basic local testing of using an InferenceSession
|
||||
in an app.
|
||||
in an app.
|
||||
|
||||
This is **NOT** intended to be a sample for end users. See https://github.com/microsoft/onnxruntime-inference-examples
|
||||
for those, in particular under the c_sharp, mobile/examples/Xamarin and mobile/examples/MAUI directories.
|
||||
|
||||
NOTE: Currently the csproj is not included in \csharp\OnnxRuntime.sln as it requires Visual Studio 2022 Preview.
|
||||
Microsoft.ML.OnnxRuntime.InferenceSample.Maui.sln is provided temporarily to enable local build/test,
|
||||
however as Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj is structured so it is ready for inclusion in
|
||||
OnnxRuntime.sln it internally references some other csproj files. Due to that the nuget restore has to be manually run.
|
||||
|
||||
From Visual Studio 2022 Preview, go to View -> Terminal.
|
||||
From the resulting terminal window, execute the command `nuget restore .\Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj`
|
||||
|
||||
After that a build should work.
|
||||
|
||||
The instructions in [../readme.me](../readme.md) regarding making onnxruntime binaries from other platforms available apply here as well.
|
||||
for those, in particular under the c_sharp and mobile/examples/MAUI directories.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Platforms>AnyCPU;x86</Platforms>
|
||||
<OnnxRuntimeCsharpRoot>$(ProjectDir)..\..\..</OnnxRuntimeCsharpRoot>
|
||||
<Configurations>Debug;Release;RelWithDebInfo</Configurations>
|
||||
|
|
|
|||
|
|
@ -1,20 +1,11 @@
|
|||
#if __XAMARIN__
|
||||
#if __IOS__
|
||||
[assembly: Foundation.LinkerSafe]
|
||||
#elif __ANDROID__
|
||||
[assembly: Android.LinkerSafe]
|
||||
#endif
|
||||
#else
|
||||
// .net 6
|
||||
#if __IOS__
|
||||
[assembly: System.Reflection.AssemblyMetadata ("IsTrimmable", "True")]
|
||||
#elif __ANDROID__
|
||||
[assembly: global::System.Reflection.AssemblyMetadata("IsTrimmable", "True")]
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Making these assembly's internals visible to the internal Test assembly
|
||||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.Common, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
|
||||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.Droid, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
|
||||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.iOS, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
|
||||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.NetCoreApp, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
|
||||
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("Microsoft.ML.OnnxRuntime.Tests.NetCoreApp, PublicKey=002400000480000094000000060200000024000052534131000400000100010059013e94e4bc70136ca4c35f33acd6b62974536b698f9c7a21cee18d805c7ad860ad9eebfdc47a96ba2f8d03f4cf1c36b9d30787e276c7b9833b5bf2a6eba7e919e6b90083078a352262aed1d842e5f70a3085cbcf4c56ae851b161137920961c23fcc246598d61d258ccc615c927b2441359eea666a99ce1c3c07dca18fb0e1")]
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<IncludeMobileTargets>true</IncludeMobileTargets>
|
||||
<BaseTargets>netstandard2.0;netcoreapp3.1;net6.0</BaseTargets>
|
||||
<BaseTargets>netstandard2.0;net6.0</BaseTargets>
|
||||
<MobileTargets></MobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -15,36 +15,16 @@
|
|||
<IncludeMobileTargets>false</IncludeMobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- add Xamarin mobile targets if we're building an ORT package and the Xamarin workloads are installed
|
||||
|
||||
NOTE: We include in a build of the managed package when creating Microsoft.ML.OnnxRuntime.Gpu as both
|
||||
the CPU and GPU packaging pipelines can publish Microsoft.ML.OnnxRuntime.Managed, and we need the targets
|
||||
to be consistent in both.
|
||||
-->
|
||||
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
||||
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Gpu') AND
|
||||
'$(IncludeMobileTargets)' == 'true' AND
|
||||
Exists('$(MSBuildExtensionsPath)\Xamarin\Android') AND
|
||||
Exists('$(MSBuildExtensionsPath)\Xamarin\iOS')">
|
||||
<MobileTargets>xamarinios10;monoandroid11.0</MobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training' AND
|
||||
'$(IncludeMobileTargets)' == 'true' AND
|
||||
Exists('$(MSBuildExtensionsPath)\Xamarin\Android')">
|
||||
<MobileTargets>monoandroid11.0</MobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- add MAUI targets if building ORT package -->
|
||||
<PropertyGroup Condition="('$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime' OR
|
||||
'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Azure') AND
|
||||
'$(IncludeMobileTargets)' == 'true'">
|
||||
<MobileTargets>$(MobileTargets);net6.0-android;net6.0-ios;net6.0-maccatalyst</MobileTargets>
|
||||
<MobileTargets>net8.0-android;net8.0-ios;net8.0-maccatalyst</MobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(OrtPackageId)' == 'Microsoft.ML.OnnxRuntime.Training' AND
|
||||
'$(IncludeMobileTargets)' == 'true'">
|
||||
<MobileTargets>$(MobileTargets);net6.0-android</MobileTargets>
|
||||
<MobileTargets>net8.0-android</MobileTargets>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
@ -114,15 +94,10 @@
|
|||
$(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>
|
||||
<IsAndroidTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">true</IsAndroidTarget>
|
||||
<IsIOSTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios' OR
|
||||
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst' OR
|
||||
$(TargetFramework.StartsWith('xamarinios'))">true</IsIOSTarget>
|
||||
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">true</IsIOSTarget>
|
||||
<IsMacTarget Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'macos'">true</IsMacTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -198,7 +173,7 @@
|
|||
<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="IsMacTarget='$(IsMacTarget)' IsIOSTarget='$(IsIOSTarget)' IsAndroidTarget='$(IsAndroidTarget)'" />
|
||||
<Message Text="OrtConstants='$(OrtConstants)' " />
|
||||
<Message Text="TargetFrameworks='$(TargetFrameworks)' " />
|
||||
</Target>
|
||||
|
|
@ -313,28 +288,17 @@
|
|||
/>
|
||||
</ItemGroup>
|
||||
|
||||
<!--
|
||||
We used to have platform specific files named *.<platform>.cs (e.g. 1.11 release) but don't anymore,
|
||||
so the 'shared' is now meaningless.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<Compile Include="**\*.shared.cs" Link="%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="$(TargetFramework.StartsWith('netstandard'))">
|
||||
<ItemGroup>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Condition=" '$(AndroidApplication)'=='true' ">
|
||||
<AndroidLibrary Include="$(MSBuildThisFileDirectory)..\..\runtimes\android\native\*">
|
||||
<Link>%(Filename)%(Extension)</Link>
|
||||
</AndroidLibrary>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
|
||||
<NativeReference Condition="'$(Platform)' == 'arm64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-arm64\native\libonnxruntime.dylib">
|
||||
<Kind>Framework</Kind>
|
||||
<IsCxx>True</IsCxx>
|
||||
<SmartLink>True</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<LinkerFlags>-lc++</LinkerFlags>
|
||||
<WeakFrameworks>CoreML</WeakFrameworks>
|
||||
</NativeReference>
|
||||
<NativeReference Condition="'$(Platform)' == 'x64'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\osx.10.14-x64\native\libonnxruntime.dylib">
|
||||
<Kind>Framework</Kind>
|
||||
<IsCxx>True</IsCxx>
|
||||
<SmartLink>True</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<LinkerFlags>-lc++</LinkerFlags>
|
||||
<WeakFrameworks>CoreML</WeakFrameworks>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -9,8 +9,7 @@
|
|||
<Error Condition="('$(PlatformTarget)' != 'x64' AND '$(PlatformTarget)' != 'arm32' AND '$(PlatformTarget)' != 'arm64' AND '$(PlatformTarget)' != 'x86' AND '$(PlatformTarget)' != 'AnyCPU') AND
|
||||
('$(OutputType)' == 'Exe' OR '$(OutputType)'=='WinExe') AND
|
||||
!('$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(PlatformTarget)' == '') AND
|
||||
('$(TargetFrameworkIdentifier)' != 'Xamarin.iOS' AND
|
||||
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'ios') AND
|
||||
$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) != 'ios' AND
|
||||
'$(SuppressOnnxRuntimePlatformCompatibilityError)' != 'true'"
|
||||
Text="Microsoft.ML.OnnxRuntime only supports the AnyCPU, x64, arm32, arm64 and x86 platforms at this time."/>
|
||||
</Target>
|
||||
|
|
|
|||
|
|
@ -1,21 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')">
|
||||
<NativeReference Condition="'$(Platform)' == 'iPhoneSimulator'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64_x86_64-simulator\onnxruntime.framework">
|
||||
<Kind>Framework</Kind>
|
||||
<IsCxx>True</IsCxx>
|
||||
<SmartLink>True</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<LinkerFlags>-lc++</LinkerFlags>
|
||||
<WeakFrameworks>CoreML</WeakFrameworks>
|
||||
</NativeReference>
|
||||
<NativeReference Condition="'$(Platform)' == 'iPhone'" Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime.xcframework\ios-arm64\onnxruntime.framework">
|
||||
<Kind>Framework</Kind>
|
||||
<IsCxx>True</IsCxx>
|
||||
<SmartLink>True</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
<LinkerFlags>-lc++</LinkerFlags>
|
||||
<WeakFrameworks>CoreML</WeakFrameworks>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
NOTE:
|
||||
|
||||
These tests no longer work as they are based on App Center's Xamarin.UITest and Xamarin is EOL.
|
||||
App Center is also deprecated with EOL in 2025.
|
||||
|
||||
The tests need to be updated based on the App Center replacement we choose.
|
||||
If that is BrowserStack, this is most likely applicable: https://learn.microsoft.com/en-us/samples/dotnet/maui-samples/uitest-appium-nunit/
|
||||
|
|
@ -1,8 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- netstandard2.0 is required by xamarin and used by most platforms.
|
||||
net6.0 is required for linux. -->
|
||||
<!-- netstandard2.0 is used by most platforms. net6.0 is required for linux. -->
|
||||
<TargetFrameworks>netstandard2.0;net6.0</TargetFrameworks>
|
||||
<IsPackable>false</IsPackable>
|
||||
<OnnxRuntimeCsharpRoot>$(ProjectDir)..\..</OnnxRuntimeCsharpRoot>
|
||||
|
|
|
|||
|
|
@ -173,4 +173,4 @@
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.onnxruntime_tests_droid">
|
||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30" />
|
||||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"></application>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.microsoft.onnxruntime_tests_droid" android:installLocation="auto">
|
||||
<uses-sdk android:minSdkVersion="27" android:targetSdkVersion="33" />
|
||||
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
</manifest>
|
||||
15
csharp/test/Microsoft.ML.OnnxRuntime.Tests.Droid/ReadMe.md
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
To test you need the libonnxruntime.so for the various Android architectures.
|
||||
|
||||
The test project looks for these in '..\..\..\build\Android\<architecture>\Release\libonnxruntime.so'.
|
||||
e.g. '..\..\..\build\Android\arm64-v8a\Release\libonnxruntime.so'
|
||||
|
||||
'..\..\..' is the root directory of the repository.
|
||||
|
||||
Build onnxruntime for the required architecture if you're testing changes in the native code.
|
||||
|
||||
Alternatively, if you're testing the C# code you can extract the AAR from the nightly nuget Microsoft.ML.OnnxRuntime package.
|
||||
- Get the nupkg from https://aiinfra.visualstudio.com/PublicPackages/_artifacts/feed/ORT-Nightly
|
||||
- Unzip it, and the AAR is in `runtimes/android/native/onnxruntime.aar`.
|
||||
- Unzip the AAR. The `jni` directory contains a directory for each architecture with the libonnxruntime.so.
|
||||
- Copy the libonnxruntime.so for the required architectures to /build/Android/<architecture>/Release.
|
||||
- e.g. x86_64 for running the emulator on an amd64 machine, and arm64-v8a for running on an arm64 Android device
|
||||
|
|
@ -13,8 +13,8 @@
|
|||
namespace Microsoft.ML.OnnxRuntime.Tests.Droid
|
||||
{
|
||||
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "1.0.0.0")]
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.2.120")]
|
||||
public partial class Resource
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -2311,8 +2311,8 @@ def build_nuget_package(
|
|||
|
||||
csharp_build_dir = os.path.join(source_dir, "csharp")
|
||||
|
||||
# in most cases we don't want/need to include the Xamarin mobile targets, as doing so means the Xamarin
|
||||
# mobile workloads must be installed on the machine.
|
||||
# in most cases we don't want/need to include the MAUI mobile targets, as doing so means the mobile workloads
|
||||
# must be installed on the machine.
|
||||
# they are only included in the Microsoft.ML.OnnxRuntime nuget package
|
||||
sln = "OnnxRuntime.DesktopOnly.CSharp.sln"
|
||||
have_exclude_mobile_targets_option = "IncludeMobileTargets=false" in msbuild_extra_options
|
||||
|
|
|
|||
|
|
@ -245,8 +245,8 @@ stages:
|
|||
- job: NuGet_Packaging_ROCm
|
||||
workspace:
|
||||
clean: all
|
||||
# we need to use the 2022 pool to create the nuget package with both pre-net6+Xamarin and net6 targets.
|
||||
# VS2019 has no support for net6 and we need to use msbuild (from the VS install) to do the packing
|
||||
# we need to use a 2022 pool to create the nuget package with MAUI targets.
|
||||
# VS2019 has no support for net6/MAUI and we need to use msbuild (from the VS install) to do the packing
|
||||
pool: 'Onnxruntime-Win-CPU-2022'
|
||||
variables:
|
||||
breakCodesignValidationInjection: ${{ parameters.DoEsrp }}
|
||||
|
|
@ -311,45 +311,22 @@ stages:
|
|||
inputs:
|
||||
versionSpec: 6.2.1
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Build .NET 6 targets using dotnet
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
# we don't specify 'Any CPU' as the platform here because if we do it gets added to the output path
|
||||
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\Any CPU\RelWithDebInfo\net6.0-ios\
|
||||
# which is inconsistent with the msbuild output path for the pre-.net6 targets
|
||||
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\monoandroid11.0
|
||||
# and makes it harder to do the packing
|
||||
#
|
||||
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
||||
script: |
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj `
|
||||
-p:SelectedTargets=Net6 `
|
||||
/p:Net6Targets=net6.0 `
|
||||
-p:Configuration=RelWithDebInfo `
|
||||
-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" `
|
||||
-p:OrtPackageId="Microsoft.ML.OnnxRuntime.ROCm" `
|
||||
-p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} `
|
||||
-p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Restore NuGet Packages and create project.assets.json for pre-.net6 targets'
|
||||
displayName: 'Restore NuGet Packages and create project.assets.json'
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:restore -p:SelectedTargets=PreNet6 -p:OrtPackageId="Microsoft.ML.OnnxRuntime.ROCm"'
|
||||
msbuildArguments: '-t:restore -p:OrtPackageId="Microsoft.ML.OnnxRuntime.ROCm"'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build C# for pre-.net6 targets'
|
||||
displayName: 'Build C# bindings'
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: RelWithDebInfo
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: >
|
||||
-p:SelectedTargets=PreNet6
|
||||
-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)"
|
||||
-p:OrtPackageId="Microsoft.ML.OnnxRuntime.ROCm"
|
||||
-p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
|
|
@ -365,22 +342,20 @@ stages:
|
|||
DisplayName: 'ESRP - Sign C# dlls'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: Update projects.assets.json with combined list of all target frameworks
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:restore -p:SelectedTargets=All -p:OrtPackageId=Microsoft.ML.OnnxRuntime.ROCm'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Nuget Packages'
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.proj'
|
||||
configuration: RelWithDebInfo
|
||||
platform: 'Any CPU'
|
||||
msbuildArguments: '-t:CreatePackage -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId=Microsoft.ML.OnnxRuntime.ROCm -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix) -p:CurrentTime=$(BuildTime) -p:CurrentDate=$(BuildDate)'
|
||||
msbuildArguments: >
|
||||
-t:CreatePackage
|
||||
-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)"
|
||||
-p:OrtPackageId=Microsoft.ML.OnnxRuntime.ROCm
|
||||
-p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
-p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
-p:CurrentTime=$(BuildTime)
|
||||
-p:CurrentDate=$(BuildDate)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: CopyFiles@2
|
||||
|
|
|
|||
|
|
@ -81,44 +81,33 @@ stages:
|
|||
versionSpec: 6.2.1
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Install .NET 6 workloads
|
||||
displayName: Install MAUI workloads
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
dotnet workload install android ios macos
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: PowerShell@2
|
||||
displayName: Build .NET 6 targets using dotnet
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
# we don't specify 'Any CPU' as the platform here because if we do it gets added to the output path
|
||||
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\Any CPU\RelWithDebInfo\net6.0-ios\
|
||||
# which is inconsistent with the msbuild output path for the pre-.net6 targets
|
||||
# e.g. csharp\src\Microsoft.ML.OnnxRuntime\bin\RelWithDebInfo\monoandroid11.0
|
||||
# and makes it harder to do the packing
|
||||
#
|
||||
# 'Any CPU' is the default (first 'mixed' platform specified in the csproj) so this should be fine.
|
||||
script: |
|
||||
dotnet build .\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj -p:SelectedTargets=Net6 -p:Configuration=RelWithDebInfo -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
dotnet workload install android ios maccatalyst
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Restore NuGet Packages and create project.assets.json for pre-.net6 targets'
|
||||
displayName: 'Restore NuGet Packages and create project.assets.json'
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:restore -p:SelectedTargets=PreNet6 -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu"'
|
||||
msbuildArguments: '-t:restore -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu"'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build C# for pre-.net6 targets'
|
||||
displayName: 'Build C# bindings'
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\OnnxRuntime.CSharp.sln'
|
||||
configuration: RelWithDebInfo
|
||||
platform: 'Any CPU'
|
||||
msbuildArguments: '-p:SelectedTargets=PreNet6 -p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)" -p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu" -p:IsReleaseBuild=${{ parameters.IsReleaseBuild }} -p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)'
|
||||
msbuildArguments: >
|
||||
-p:OnnxRuntimeBuildDirectory="$(Build.BinariesDirectory)"
|
||||
-p:OrtPackageId="Microsoft.ML.OnnxRuntime.Gpu"
|
||||
-p:IsReleaseBuild=${{ parameters.IsReleaseBuild }}
|
||||
-p:ReleaseVersionSuffix=$(ReleaseVersionSuffix)
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- template: ../templates/win-esrp-dll.yml
|
||||
|
|
@ -127,15 +116,6 @@ stages:
|
|||
DisplayName: 'ESRP - Sign C# dlls'
|
||||
DoEsrp: ${{ parameters.DoEsrp }}
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: Update projects.assets.json with combined list of all target frameworks
|
||||
inputs:
|
||||
solution: '$(Build.SourcesDirectory)\csharp\src\Microsoft.ML.OnnxRuntime\Microsoft.ML.OnnxRuntime.csproj'
|
||||
platform: 'Any CPU'
|
||||
configuration: RelWithDebInfo
|
||||
msbuildArguments: '-t:restore -p:SelectedTargets=All -p:OrtPackageId=Microsoft.ML.OnnxRuntime.Gpu'
|
||||
workingDirectory: '$(Build.SourcesDirectory)\csharp'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build Nuget Packages'
|
||||
inputs:
|
||||
|
|
@ -232,4 +212,4 @@ stages:
|
|||
|
||||
- task: mspremier.PostBuildCleanup.PostBuildCleanup-task.PostBuildCleanup@3
|
||||
displayName: 'Clean Agent Directories'
|
||||
condition: always()
|
||||
condition: always()
|
||||
|
|
|
|||
|
|
@ -119,8 +119,8 @@ stages:
|
|||
- job: NuGet_Packaging_Training_CPU
|
||||
workspace:
|
||||
clean: all
|
||||
# we need to use the 2022 pool to create the nuget package with both pre-net6+Xamarin and net6 targets.
|
||||
# VS2019 has no support for net6 and we need to use msbuild (from the VS install) to do the packing
|
||||
# we need to use a 2022 pool to create the nuget package with MAUI targets.
|
||||
# VS2019 has no support for net6/MAUI and we need to use msbuild (from the VS install) to do the packing
|
||||
pool: 'Onnxruntime-Win-CPU-2022'
|
||||
variables:
|
||||
OrtPackageId: ${{ parameters.OrtNugetPackageId }}
|
||||
|
|
|
|||
|
|
@ -260,28 +260,16 @@ def generate_dependencies(xml_text, package_name, version):
|
|||
xml_text.append(dml_dependency)
|
||||
xml_text.append("</group>")
|
||||
if package_name == "Microsoft.ML.OnnxRuntime":
|
||||
# Support monoandroid11.0
|
||||
xml_text.append('<group targetFramework="monoandroid11.0">')
|
||||
# Support net8.0-android
|
||||
xml_text.append('<group targetFramework="net8.0-android31.0">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support xamarinios10
|
||||
xml_text.append('<group targetFramework="xamarinios10">')
|
||||
# Support net8.0-ios
|
||||
xml_text.append('<group targetFramework="net8.0-ios15.4">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support net6.0-android
|
||||
xml_text.append('<group targetFramework="net6.0-android31.0">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support net6.0-ios
|
||||
xml_text.append('<group targetFramework="net6.0-ios15.4">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support net6.0-macos
|
||||
xml_text.append('<group targetFramework="net6.0-macos12.3">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support net6.0-maccatalyst
|
||||
xml_text.append('<group targetFramework="net6.0-maccatalyst14.0">')
|
||||
# Support net8.0-maccatalyst
|
||||
xml_text.append('<group targetFramework="net8.0-maccatalyst14.0">')
|
||||
xml_text.append('<dependency id="Microsoft.ML.OnnxRuntime.Managed"' + ' version="' + version + '"/>')
|
||||
xml_text.append("</group>")
|
||||
# Support Native C++
|
||||
|
|
@ -321,6 +309,10 @@ def generate_release_notes(line_list, dependency_sdk_info):
|
|||
|
||||
|
||||
def generate_metadata(line_list, args):
|
||||
tags = "native ONNX Runtime ONNXRuntime Machine Learning MachineLearning"
|
||||
if "Microsoft.ML.OnnxRuntime.Training." in args.package_name:
|
||||
tags.append(" ONNXRuntime-Training Learning-on-The-Edge On-Device-Training On-Device Training")
|
||||
|
||||
metadata_list = ["<metadata>"]
|
||||
generate_id(metadata_list, args.package_name)
|
||||
generate_version(metadata_list, args.package_version)
|
||||
|
|
@ -328,13 +320,7 @@ def generate_metadata(line_list, args):
|
|||
generate_owners(metadata_list, "Microsoft")
|
||||
generate_description(metadata_list, args.package_name)
|
||||
generate_copyright(metadata_list, "\xc2\xa9 " + "Microsoft Corporation. All rights reserved.")
|
||||
(
|
||||
generate_tags(metadata_list, "ONNX ONNX Runtime Machine Learning")
|
||||
if "Microsoft.ML.OnnxRuntime.Training." in args.package_name
|
||||
else generate_tags(
|
||||
metadata_list, "native ONNX ONNXRuntime-Training Learning-on-The-Edge On-Device-Training MachineLearning"
|
||||
)
|
||||
)
|
||||
generate_tags(metadata_list, tags)
|
||||
generate_icon(metadata_list, "ORT_icon_for_light_bg.png")
|
||||
generate_license(metadata_list)
|
||||
generate_project_url(metadata_list, "https://github.com/Microsoft/onnxruntime")
|
||||
|
|
|
|||