You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update out-of-support net8.0 MAUI targets to net9.0 (microsoft#26463)
### Description
<!-- Describe your changes. -->
.NET MAUI 8 is out of support. See here:
https://dotnet.microsoft.com/en-us/platform/support/policy/maui
We started seeing errors about this in the NuGet packaging pipeline.
```
##[error]C:\Program Files\dotnet\sdk\9.0.306\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.EolTargetFrameworks.targets(38,5): Error NETSDK1202: The workload 'net8.0-ios' is out of support and will not receive security updates in the future. Please refer to https://aka.ms/maui-support-policy for more information about the support policy.
```
This change updates net8.0 mobile target framework monikers to net9.0.
### 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. -->
Fix packaging pipeline.
Copy file name to clipboardExpand all lines: csharp/sample/InferenceSample/Microsoft.ML.OnnxRuntime.InferenceSample.Maui/Microsoft.ML.OnnxRuntime.InferenceSample.Maui.csproj
Copy file name to clipboardExpand all lines: csharp/test/Microsoft.ML.OnnxRuntime.Tests.BrowserStack.Android/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
This project will run the Android MAUI tests on BrowserStack, which allows you to run automated tests on a variety of mobile devices.
3
3
4
4
## Context
5
-
Microsoft.ML.OnnxRuntime.Tests.MAUI uses DeviceRunners.VisualRunners to allow running the unit tests (found in Microsoft.ML.OnnxRuntime.Tests.Common) across multiple devices. DeviceRunners.VisualRunners provides a simple UI with a button that will run the unit tests and a panel with the unit test results.
5
+
Microsoft.ML.OnnxRuntime.Tests.MAUI uses DeviceRunners.VisualRunners to allow running the unit tests (found in Microsoft.ML.OnnxRuntime.Tests.Common) across multiple devices. DeviceRunners.VisualRunners provides a simple UI with a button that will run the unit tests and a panel with the unit test results.
6
6
7
7
In order to automate the process of running the unit tests across mobile devices, Appium is used for UI testing orchestration (it provides a way to interact with the UI), and BrowserStack automatically runs these Appium tests across different mobile devices.
8
8
9
-
This project does not include the capability to start an Appium server locally or attach to a local emulator or device.
9
+
This project does not include the capability to start an Appium server locally or attach to a local emulator or device.
10
10
11
11
## Build & run instructions
12
12
### Requirements
@@ -22,8 +22,8 @@ This project does not include the capability to start an Appium server locally o
22
22
23
23
### Run instructions
24
24
1. Build the Microsoft.ML.OnnxRuntime.Tests.MAUI project into a signed APK.
25
-
1. Run the following: `dotnet publish -c Release -f net8.0-android` in the Microsoft.ML.OnnxRuntime.Tests.MAUI directory.
26
-
2. Search for the APK files generated. They should be located in `bin\Release\net8.0-android\publish`.
25
+
1. Run the following: `dotnet publish -c Release -f net9.0-android` in the Microsoft.ML.OnnxRuntime.Tests.MAUI directory.
26
+
2. Search for the APK files generated. They should be located in `bin\Release\net9.0-android\publish`.
27
27
3. If they're in a different location, edit the `browserstack.yml` file to target the path to the signed APK.
28
28
2. Ensure you've set the BrowserStack credentials as environment variables.
29
29
3. Run the following in the Microsoft.ML.OnnxRuntime.Tests.Android.BrowserStack directory: `dotnet test`
@@ -36,13 +36,13 @@ This project does not include the capability to start an Appium server locally o
- Make sure that the maui and maui-android workloads are installed correctly by running `dotnet workload list`
41
41
- If you believe the issues are workload related, you can also try running `dotnet workload repair` (this has personally never worked for me)
42
-
- Try running `dotnet clean`. However, this does not fully remove all the previous intermediaries. If you're still running into the errors, manually deleting the bin and obj folders can sometimes resolve them.
42
+
- Try running `dotnet clean`. However, this does not fully remove all the previous intermediaries. If you're still running into the errors, manually deleting the bin and obj folders can sometimes resolve them.
43
43
- After building the MAUI app, try installing on an emulator and clicking the "Run All" button to ensure that everything is working. (If you are missing the ONNXRuntime package, it will not show up as an error until you click "Run All".)
44
44
- Running the MAUI app from Visual Studio will not replicate running it through BrowserStack. Instead, use `adb install [path to signed apk]` to install the app then use the emulator to launch the app.
45
45
- Issues with the Android.BrowserStack test app: there is an Appium Doctor package on npm -- run `npm install @appium/doctor --location=global` then `appium-doctor --android` and follow the directed instructions. Some errors with Appium on Android will not appear until runtime.
46
46
- Connection refused by Appium server: this can happen if you already have an Appium server running locally. If you do, stop the Appium server then try `dotnet test` again.
47
-
- App is crashing on BrowserStack or it emits an error that it cannot run this APK file: make sure that you are passing in the correct signed APK from the publish folder.
47
+
- App is crashing on BrowserStack or it emits an error that it cannot run this APK file: make sure that you are passing in the correct signed APK from the publish folder.
48
48
- It appears that a test runs on CLI but a build is not launched on BrowserStack: this happens when the BrowserStack Test Adapter cannot find the browserstack.yml file (which has to be named "browserstack.yml" -- do not be tricked by BrowserStack's article on custom-named configuration files)
0 commit comments