onnxruntime/csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui
Scott McKay 0e85af6990
Add MAUI csharp\sample\InferenceSample\ project (#12356)
Add csharp\sample\InferenceSample\Microsoft.ML.OnnxRuntime.InferenceSample.Maui so we have an equivalent setup for MAUI as for the other platforms.

This provides a setup to do some basic local testing of using an InferenceSession in a MAUI app.
2022-07-29 07:22:36 +10:00
..
Platforms Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
Properties Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
Resources Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
App.xaml Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
App.xaml.cs Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
AppShell.xaml Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
AppShell.xaml.cs Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
MainPage.xaml Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
MainPage.xaml.cs Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
MauiProgram.cs Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
Microsoft.ML.OnnxRuntime.InferenceSample.Maui.sln Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00
ReadMe.md Add MAUI csharp\sample\InferenceSample\ project (#12356) 2022-07-29 07:22:36 +10:00

MAUI app that is used directly with the C# bindings project to do some basic local testing of using an InferenceSession 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 regarding making onnxruntime binaries from other platforms available apply here as well.