onnxruntime/csharp/test/Microsoft.ML.OnnxRuntime.Tests.Droid
Scott McKay e788b3d30e
Fix C# warnings. (#21913)
### Description
<!-- Describe your changes. -->
Update some testing dependencies.
Fix various warnings. Mainly around documentation (existing) and unit
test usage (mainly resulting from xunit update).

Invalid angle brackets for generics in documentation were changed to use
curly braces based on
https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/xmldoc/
> To refer to generic identifiers in code reference (cref) elements, you
can use either the escape characters (for example, cref="List&lt;T&gt;")
or braces (cref="List{T}"). As a special case, the compiler parses the
braces as angle brackets to make the documentation comment less
cumbersome to the author when referring to generic identifiers.

### 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. -->
2024-09-03 10:08:29 +10:00
..
Assets Add Xamarin support (#9436) 2021-10-27 20:07:07 +10:00
Properties Update to the net8 MAUI targets. Remove Xamarin. (#21062) 2024-06-19 16:20:58 +10:00
Resources Update to the net8 MAUI targets. Remove Xamarin. (#21062) 2024-06-19 16:20:58 +10:00
InferenceTest.android.cs Add Xamarin support (#9436) 2021-10-27 20:07:07 +10:00
MainActivity.cs Add Xamarin support (#9436) 2021-10-27 20:07:07 +10:00
Microsoft.ML.OnnxRuntime.Tests.Droid.csproj Fix C# warnings. (#21913) 2024-09-03 10:08:29 +10:00
ReadMe.md Update to the net8 MAUI targets. Remove Xamarin. (#21062) 2024-06-19 16:20:58 +10:00

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//Release.
    • e.g. x86_64 for running the emulator on an amd64 machine, and arm64-v8a for running on an arm64 Android device