mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-17 21:10:43 +00:00
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.
15 lines
641 B
Text
15 lines
641 B
Text
Any raw assets you want to be deployed with your application can be placed in
|
|
this directory (and child directories). Deployment of the asset to your application
|
|
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
|
|
|
|
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
|
|
|
These files will be deployed with you package and will be accessible using Essentials:
|
|
|
|
async Task LoadMauiAsset()
|
|
{
|
|
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
|
|
using var reader = new StreamReader(stream);
|
|
|
|
var contents = reader.ReadToEnd();
|
|
}
|