chore: run Android-native tests on .NET 9, not .NET 8#21183
chore: run Android-native tests on .NET 9, not .NET 8#21183jeromelaban merged 20 commits intomasterfrom
Conversation
Context: #21140 Context: https://dev.azure.com/uno-platform/Uno%20Platform/_build/results?buildId=172373&view=ms.vss-test-web.build-test-results-tab&runId=3427773&resultId=100090&paneView=debug @jonpryor is starting to suspect that many of the Android-native unit test failures on #21140 -- which attempts to build Uno under .NET 10 -- are in fact caused by running the unit tests under .NET 9 instead of .NET 8. Try to verify that assumption: update `.azure-devops-tests-android-native.yml` so that it builds and runs the Android native `SamplesApp` against .NET 9 instead of .NET 8. Does It Pass Tests?
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
Assumption verified: many of the unit test failures I saw on #21140 are also present in this PR. It's not .NET 10 that causes e.g.
Additionally, wrt then the test passes under .NET 9. Also notable is that many of the test failures are due to |
|
It should also be noted that #21171 is of a similar theme: building and running various tests fails under .NET 9. |
|
|
|
Failures might be related to microsoft/appcenter#723 ? |
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 now requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 now requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 now requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Update `SamplesApp.UITests.csproj` to explicitly use Microsoft.NET.Test.Sdk 17.14.1, to "override" the nearly four year old Microsoft.NET.Test.Sdk 17.0.0 reference implicitly brought in from Uno.UITest.Helpers/1.1.0-dev.70. This hopefully fixes a `MissingMethodException` for `IFileSystem.Exists(string)` seen on CI: Unhandled exception. System.MissingMethodException: Method not found: 'Boolean Microsoft.Testing.Platform.Helpers.IFileSystem.Exists(System.String)'. at Microsoft.Testing.Extensions.VSTestBridge.Configurations.RunSettingsConfigurationProvider.BuildAsync(CommandLineParseResult commandLineParseResult) at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine) at Microsoft.Testing.Extensions.VSTestBridge.Configurations.RunSettingsConfigurationProvider.BuildAsync(CommandLineParseResult commandLineParseResult) at Microsoft.Testing.Platform.Configurations.ConfigurationManager.BuildAsync(IFileLoggerProvider syncFileLoggerProvider, CommandLineParseResult commandLineParseResult) in /_/src/Platform/Microsoft.Testing.Platform/Configurations/ConfigurationManager.cs:line 37 at Microsoft.Testing.Platform.Hosts.TestHostBuilder.BuildAsync(ApplicationLoggingState loggingState, TestApplicationOptions testApplicationOptions, IUnhandledExceptionsHandler unhandledExceptionsHandler, DateTimeOffset createBuilderStart) in /_/src/Platform/Microsoft.Testing.Platform/Hosts/TestHostBuilder.cs:line 131 at Microsoft.Testing.Platform.Builder.TestApplicationBuilder.BuildAsync() in /_/src/Platform/Microsoft.Testing.Platform/Builder/TestApplicationBuilder.cs:line 112 at TestingPlatformEntryPoint.Main(String[] args) in /__w/1/s/src/SamplesApp/SamplesApp.UITests/obj/Release/net9.0/TestPlatformEntryPoint.cs:line 14 at TestingPlatformEntryPoint.<Main>(String[] args) TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. This can make it annoyingly difficult to `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. This can make it annoyingly difficult to `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
src/SamplesApp/SamplesApp.Skia.netcoremobile/Android/AndroidManifest.xml
Fixed
Show fixed
Hide fixed
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21183/docs/index.html |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21183/wasm-skia-net9/index.html |
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Android native test pipeline to run against .NET 9 instead of .NET 8, as part of an effort to verify if test failures in the .NET 10 migration are related to runtime version mismatches. The change updates build configurations, test infrastructure, and adds platform-specific test exclusions.
- Updates Android native CI pipeline to build and test against .NET 9 framework
- Adds platform exclusions for failing tests on Android native platform
- Updates Android build tools and adds workarounds for UI test compatibility
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| build/ci/tests/.azure-devops-tests-android-native.yml | Updates target framework from net8.0-android to net9.0-android and related paths |
| build/test-scripts/android-uitest-run.sh | Updates Android build tools version and adds Xamarin.UITest compatibility workaround |
| src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_AppBarButton.cs | Excludes test from Android native due to known issue |
| src/Uno.UI.RuntimeTests/IntegrationTests/dxaml/controls/commandbar/CommandBarIntegrationTests.cs | Extends test exclusion from iOS to include Android |
| src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/ComboBoxTests/ComboxBox_DropDownPlacement.cs | Adds Android-specific test skip with detailed failure analysis |
| src/SamplesApp/SamplesApp.UITests/SampleControlUITestBase.cs | Improves error handling for cold start timeout exceptions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
The build 174325 found UI Test snapshots differences: Details
|
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #19934 Context: #21140 Context: dotnet/sdk#48949 #19934 was the first attempt to build unoplatform/uno with .NET 10. It *built* (mostly), but it had *lots* of unit test failures (over 3700) that were not understood at the time. #21140 was an attempt to cleanup & simplify #19934. It partially succeeded, but required additional reconsideration for a cleaner and more understandable merge. (Later, PR #21183 helped explain many of the unit test failures that PR #19934 observed: Xamarin.UITest doesn't work reliably under .NET 9! See microsoft/appcenter#2646 and microsoft/appcenter#327!) Some of the contents of #19934 and #21140 have been split out into separately merged PRs such as #21230 (CS0246 fixes) and #21199 (remove `[Export]` in some scenarios). Squash existing "known good" and related changes: * doc updates * Bumping target framework versions, * Use uno.check 1.32.0-dev.45, which knows about .NET 10 Preview 7. * `$(TreatWarningsAsErrors)`=true + NuGet warnings. For example: error NU1510: Warning As Error: PackageReference System.Private.Uri will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * `$(TreatWarningsAsErrors)`=true + CS8604 or CS0809 warnings due to nullability changes, particularly in iOS. * `$(TreatWarningsAsErrors)`=true + IL2\* warnings, some of which @jonpryor was able to fix in a reasonable timeframe, and some of which was thrown into `$(NoWarn)` to deal with later. * Remove hardcoded `$(TargetFramework)`=net8.0 from `Uno.UI.RemoteControl.TestProcessor.csproj`, so that it builds, and remove other uses of `net8.0` from everywhere other than `src/SolutionTemplate`. * Provide `%(PackageReference.Version)` for packages that were producing NU1015 errors, specifically `Uno.Fonts.OpenSans`. * Remove `@(PackageReference)` values which produced NU1510 warnings such as: warning NU1510: PackageReference Microsoft.Win32.Registry will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. * Improve `dotnet-install.yml` use, as some CI environments *don't* have a `unoplatform/uno` checkout, and thus *cannot* copy files such as `build/ci/net10/global.json`. * Improve `local-android-uitest-run.sh` for local macOS use: Export and use `$ANDROID_AVD_HOME`, so that we have a "known" location for whare Emulator images are created. (Not sure what's wrong with my environment, but they are not reliably created or loaded from `$HOME/.android/avd`.) Also update so that it doesn't require running the script from the `build/test-scripts` directory. You can now run it from topdir: UITEST_IS_LOCAL=true \ build/test-scripts/local-android-uitest-run.sh * Provision OpenJDK-17, as .NET 9 requires it. * Use Xcode 16.4, as .NET 10 iOS now requires it. * Add new `$(NetPreviousNetCoreApple)` MSBuild property to `Directory.Build.props`, which contains target frameworks for $(NetPrevios) Apple platforms. Update `Uno.UI.Runtime.Skia.AppleUIKit.csproj` to use `$(NetPreviousNetCoreApple)`, and update `skia-ios-uitest-build.sh` to provide a "complete" target framework version. This is so that target frameworks are consistent: `net9.0-ios` *floats*; circa a year ago, it aliased `net9.0-ios18.0`, and *today* it aliases `net9.0-ios18.5`. "Even better", this doesn't "flow" to the C# compiler: `net9.0-ios` sets `IOS18_0_OR_GREATER` *but not* `IOS18_5_OR_GREATER` *even when* the 18.5 assemblies are used! This can make it annoyingly difficult to get `[Obsolete]`s consistent across separate project builds. TODO, for future commits to this PR: * Xamarin.AndroidX package version bumps from #21205. We felt that these shouldn't be separately merged, as some of version bumps are quite significant and should instead only be used with .NET 10. * A new understanding of `src/SolutionTemplate`: the intent, as @jonpryor currently understands it, is that tests within `src/SolutionTemplate` are "frozen in time"; `$(TargetFrameworks)` should *not* be updated, etc. Which means that when we drop support for an older version of .NET, we should in turn *remove the old tests*.
Context: #21140
Context: https://dev.azure.com/uno-platform/Uno%20Platform/_build/results?buildId=172373&view=ms.vss-test-web.build-test-results-tab&runId=3427773&resultId=100090&paneView=debug
@jonpryor is starting to suspect that many of the Android-native unit test failures on #21140 -- which attempts to build Uno under .NET 10 -- are in fact caused by running the unit tests under .NET 9 instead of .NET 8.
Try to verify that assumption: update
.azure-devops-tests-android-native.ymlso that it builds and runs the Android nativeSamplesAppagainst .NET 9 instead of .NET 8.Does It Pass Tests?
GitHub Issue: closes #
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️