Skip to content

chore: bump Xamarin.AndroidX Package Versions#21205

Closed
jonpryor wants to merge 5 commits intomasterfrom
dev/jonp/jonp-bump-AndroidX-deps
Closed

chore: bump Xamarin.AndroidX Package Versions#21205
jonpryor wants to merge 5 commits intomasterfrom
dev/jonp/jonp-bump-AndroidX-deps

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Aug 5, 2025

Context: #21140
Context: https://github.com/unoplatform/uno-private/issues/1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking point is that running within an Android+NativeAOT environment requires the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to provide bindings for both .NET 8 and .NET 10 previews, which allows apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions which provide both .NET 8 and .NET 10 binaries.

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:

Other information ℹ️

Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries.
@github-actions github-actions bot added area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk labels Aug 5, 2025
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21205/docs/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21205/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 172858 has failed on Uno.UI - CI.

Context: c6a2bce

Commit c6a2bce generated a number of NuGet errors on CI, e.g.:

	…/uno51blank.csproj : error NU1608: Warning As Error:
	Detected package version outside of dependency constraint: Xamarin.AndroidX.Lifecycle.Process 2.8.7.4 requires Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.7.4 && < 2.8.8) but version Xamarin.AndroidX.Lifecycle.Runtime 2.9.1 was resolved.

Current assumption from reading the `uno51blank.csproj` binlog is that
the "root cause" is this:

	PackageVersion
	    …
	    Xamarin.Google.Android.Material
	        Version = 1.10.0.3

i.e. that the app was pulling in
[Xamarin.Google.Android.Material 1.10.0.3][0] -- from 2024-Feb-22! --
which in turn eventually brought in Xamarin.AndroidX.Lifecycle.Process,
resulting in the above NU1608 warning-as-error.

Update the versions of *all* `Xamarin.*` NuGet packages, including
`Xamarin.Google.Android.Material`.

Hopefully this will resolve the NU1608 warning.

[0]: https://www.nuget.org/packages/Xamarin.Google.Android.Material/1.10.0.3
@github-actions github-actions bot added area/solution-templates Categorizes an issue or PR as relevant to the solution template area/automation Categorizes an issue or PR as relevant to project automation labels Aug 6, 2025
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21205/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

⚠️⚠️ The build 172959 has failed on Uno.UI - CI.

Context: 832fbc5

The attempt to "bump all the Xamarin.* things?" (832fbc5) failed:

	src\Uno.UI.BindingHelper.Android\Uno.UI.BindingHelper.Android.netcoremobile.csproj(0,0):
	Error NU1608: Warning As Error: Detected package version outside of dependency constraint: Xamarin.AndroidX.Lifecycle.Process 2.8.7.4 requires Xamarin.AndroidX.Lifecycle.Runtime (>= 2.8.7.4 && < 2.8.8) but version Xamarin.AndroidX.Lifecycle.Runtime 2.9.1 was resolved.

What's interesting (to me) is *why*: I bumped to the most recent
version of all the packages, but doesn't work, as not all packages
are updated at the same time, and thus aren't consistent.

Case in point:

  * [Xamarin.AndroidX.Activity/1.10.1.2][0] (the current latest)
    depends on Xamarin.AndroidX.Lifecycle.Runtime/2.8.7.4

  * [Xamarin.AndroidX.AppCompat/1.7.1][1] (the current latest)
    depends on Xamarin.AndroidX.Lifecycle.Runtime/2.9.1

Oops.

For future reference, the `.binlog` is not entirely helpful for
diagnosing NU1608.  The generated `obj/*/project.nuget.cache` helps.

Drop the Xamarin.AndroidX.Activity version from 1.7.1 to [1.7.0.7][2],
which has a consistent Xamarin.AndroidX.Lifecycle.Runtime/2.8.7.4 dep.

Review the other package updates in 832fbc5, and drop the versions
so that they align *in time* ("2 months ago").  This should help ensure
consistency across packages.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Activity/1.10.1.2#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.AppCompat/1.7.1#dependencies-body-tab
[2]: https://www.nuget.org/packages/Xamarin.AndroidX.AppCompat/1.7.0.7#dependencies-body-tab
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21205/wasm-skia-net9/index.html

Context: af83457

Similar to Xamarin.AndroidX.AppCompat in af83457, the
Xamarin.AndroidX.Lifecycle.LiveData NuGet package had *two* releases
"two months ago": 2.8.7.4 and 2.9.0.

Usage of the newer 2.9.0 resulted in various NU1608 errors:

	C:\a\1\s\src\Uno.UI\Uno.UI.netcoremobile.csproj : error NU1608:
	Warning As Error: Detected package version outside of dependency constraint:
	Xamarin.AndroidX.Lifecycle.ViewModelSavedState 2.8.7.4 requires Xamarin.AndroidX.Lifecycle.LiveData.Core (>= 2.8.7.4 && < 2.8.8)
	but version Xamarin.AndroidX.Lifecycle.LiveData.Core 2.9.0 was resolved. [C:\a\1\s\Build\filters\Uno.UI-packages-netcoremobile.slnf]

Use Xamarin.AndroidX.Lifecycle.LiveData 2.8.7.4 to avoid the NU1608.

Local builds then hit another issue: the `AndroidX.DocumentFile`
namespace could not be resolved, resulting in a C# compilation error:

	src/Uno.UWP/Storage/StorageFolder.saf.Android.cs(31,21): error CS0246: The type or namespace name 'DocumentFile' could not be found (are you missing a using directive or an assembly reference?)

The cause for this is the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix the CS0246 by explicitly adding a reference to
Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
@unodevops
Copy link
Contributor

⚠️⚠️ The build 173055 has failed on Uno.UI - CI.

@github-actions github-actions bot added the platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform label Aug 7, 2025
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21205/docs/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21205/wasm-skia-net9/index.html

@github-actions github-actions bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Aug 7, 2025
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21205/docs/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-21205/wasm-skia-net9/index.html

@nventive-devops
Copy link
Contributor

The build 173120 found UI Test snapshots differences: android-28-net8: 26, android-28-net8-Snap: 37, ios: 3, ios-Snap: 48, skia-linux-screenshots: 88, skia-windows-screenshots: 145, wasm: 42, wasm-automated-net9.0-WinUI-Benchmarks-automated: 0, wasm-automated-net9.0-WinUI-Default-automated: 18, wasm-automated-net9.0-WinUI-RuntimeTests-0: 0, wasm-automated-net9.0-WinUI-RuntimeTests-1: 0, wasm-automated-net9.0-WinUI-RuntimeTests-2: 0

Details
  • android-28-net8: 26 changed over 825

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Button_NestedButtons_Validation_nVentive_Umbrella_Views_UI_Samples_Content_UITests_ButtonTestsControl_Nested_Buttons
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • FlyoutTest_When_NoOverlayInputPassThroughElement_Then_DontPassThrough_woOff_UITests_Shared_Windows_UI_Xaml_Controls_Flyout_Flyout_OverlayInputPassThroughElement
    • InputScope_Should_Not_Validate_Input_Uno_UI_Samples_Content_UITests_TextBoxControl_Input_InputScope_CurrencyAmount
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • NavigateBackAndForthBetweenMenuItemsAndSettings_Fluent_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • WebView_NavigateToAnchor_click_anchor
    • WebView_NavigateToAnchor_Initial
    • WebView_NavigateToAnchor_navigate_to_anchor
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
  • android-28-net8-Snap: 37 changed over 1074

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_Border_AntiAlias_UITests_Windows_UI_Xaml_Controls_BorderTests_BorderAntiAlias
    • Border_Border_CornerRadius_BorderThickness_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_CornerRadius_BorderThickness
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • Border_Border_CornerRadius_Alignments_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Alignments
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_NoSize
    • Scrolling_MUXControlsTestApp_ScrollViewWithScrollControllersPage_MUXControlsTestApp_ScrollViewWithScrollControllersPage
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • TeachingTip_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage_UITests_Microsoft_UI_Xaml_Controls_TeachingTipTests_TeachingTipPage
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • Microsoft_UI_Composition_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple
    • Scrolling_MUXControlsTestApp_ScrollViewDynamicPage_MUXControlsTestApp_ScrollViewDynamicPage
    • Scrolling_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage_MUXControlsTestApp_ScrollViewKeyboardAndGamepadNavigationPage
    • TextBlock_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
  • ios: 3 changed over 256

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • TextBox_UpdatedBinding_On_OneWay_Mode_UITests_Windows_UI_Xaml_Controls_TextBox_TextBox_Bindings
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • ios-Snap: 48 changed over 991

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_ImageBrushWithCompositeTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithCompositeTransform
    • Buttons_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplate
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Vertical
    • Microsoft_UI_Xaml_Media_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_Overlap_UITests_Windows_UI_Xaml_Media_ThemeShadowTests_ThemeShadow_Overlap
    • NavigationView_MUXControlsTestApp_NavigationViewMinimalPage_MUXControlsTestApp_NavigationViewMinimalPage
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • Brushes_ImageBrushWithRotateTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithRotateTransform
    • Flyouts_UITests_Windows_UI_Xaml_Controls_Flyout_Flyout_TemplatedParent_UITests_Windows_UI_Xaml_Controls_Flyout_Flyout_TemplatedParent
    • Brushes_ImageBrushStretch_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushStretch
    • ContentControl_ContentControl_SelectorInheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SelectorInheritance
    • NavigationView_NavigationViewSample_SamplesApp_Samples_NavigationViewSample_NavigationViewSample
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_UITests_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Native_Frame_UITests_Windows_UI_Xaml_Controls_CommandBar_CommandBar_Native_Frame
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Bigger
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Equal
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Smaller
    • Image_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller_Uno_UI_Samples_UITests_Image_Image_Stretch_Alignment_Taller
    • WebView_WebView_NavigateToUri_Uno_UI_Samples_Content_UITests_WebView_WebView_NavigateToUri
    • ColorPicker_ColorPickerSample_UITests_Microsoft_UI_Xaml_Controls_ColorPickerTests_ColorPickerSample
    • Grid_Grid_DataBound_ColumnRow_Definitions_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_DataBound_ColumnRow_Definitions
  • skia-linux-screenshots: 88 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ClipboardTests.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Buttons.png-dark
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ButtonClippingTestsControl.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ImageWithLateSourceUniformToFill.png-dark
    • ImageWithLateSourceUniformToFill.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • Examples.png
  • skia-windows-screenshots: 145 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Border_With_RotateTransform.png-dark
    • Border_With_RotateTransform.png
    • Border_With_ScaleTransform.png
    • Border_With_TranslateTransform.png-dark
    • Basics_Automated.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Border_With_CompositeTransform.png-dark
    • Border_With_CompositeTransform.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ImageSourceUrlMsAppxScheme.png-dark
    • ImageSourceUrlMsAppxScheme.png
    • ImageSourceUrlNoScheme.png-dark
    • ImageSourceUrlNoScheme.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
  • wasm: 42 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • GenericApp.Views.Samples.Shared.Content.UITests.GridViewMultipleSelectionMode
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_IsSelected
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_ChangeView
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_DataContext_Propagation
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.Button_Enabled_Control_Disabled
    • UITests.Shared.Windows_UI_Xaml_Controls.CommandBar.CommandBar_Xaml_Automated
    • UITests.Windows_UI_Xaml_Controls.ListView.ListViewItem_IsEnabled
    • Uno.UI.Samples.Content.UITests.FocusTests.FocusManagerTest
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Inside_ListView
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewPage
    • UITests.Windows_UI_Xaml_Controls.Repeater.ItemsRepeater_Nested
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_DropDownPlacement
    • UITests.Windows_UI_Xaml_Controls.BorderTests.PanelWithNullBrushAndNonZeroThickness
    • Uno.UI.Samples.Content.UITests.GridTestsControl.Grid_CenteredShapes
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.SwipeControlTests.SwipeControl_ListView_ItemClick
    • UITests.Windows_UI_Xaml_Media_Animation.DoubleAnimation_FinalState_Opacity
    • UITests.Uno_Web.Http.CookieManagerTests
  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 0 changed over 1

  • wasm-automated-net9.0-WinUI-Default-automated: 18 changed over 877

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Default_StrokeThickness_MyLine
    • Default_StrokeThickness_MyPolygon
    • When_Padding_Is_Changed_Then_Cache_Is_Missed_UITests_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_MeasureCache
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyEllipse
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyPath
    • Default_StrokeThickness_MyRect
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_TextTrimming_Is_Set_Then_Ellipsis_Is_Used_UITests_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_TextTrimming
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • When_MaxLines_Then_AlignmentPositionIsCorrect_Uno_UI_Samples_Content_UITests_TextBlockControl_SimpleText_MaxLines_Two_With_Wrap
    • Default_StrokeThickness_MyPolyline
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • wasm-automated-net9.0-WinUI-RuntimeTests-0: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-1: 0 changed over 1

  • wasm-automated-net9.0-WinUI-RuntimeTests-2: 0 changed over 1

@jonpryor
Copy link
Contributor Author

Consensus is that:

  1. This should be part of a .NET 10 PR, as
  2. The NuGet version bumps should only apply to .NET 10. .NET 9 NuGet package versions should be unchanged.

jonpryor added a commit that referenced this pull request Aug 13, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 13, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 14, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 14, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 14, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 14, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 14, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 15, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 15, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 15, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 15, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 15, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 15, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 15, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 15, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 18, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 18, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 18, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 18, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 25, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 25, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 25, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 25, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jonpryor added a commit that referenced this pull request Aug 26, 2025
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*.
jonpryor added a commit that referenced this pull request Aug 26, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
jeromelaban pushed a commit that referenced this pull request Aug 27, 2025
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*.
jeromelaban pushed a commit that referenced this pull request Aug 27, 2025
Context: #21205
Context: #21140
Context: unoplatform/uno-private#1422
Context: dotnet/java-interop@356485e

While exploring the use of NativeAOT on Android for .NET 10, a sticking
point is that running within an Android+NativeAOT environment requires
the use of a new "style" of bindings; see dotnet/java-interop@356485ee.

The new style requires .NET 10.

However, the various Xamarin.AndroidX packages have been updated to
provide bindings for *both* .NET 8 *and* .NET 10 previews, which allows
apps targeting .NET 10 to begin exploring NativeAOT use.

Update the required Xamarin.AndroidX NuGet package versions to versions
which provide both .NET 8 and .NET 10 binaries, but *only* for
.NET 10 target frameworks.  .NET 9 targets continue. using the previous
NuGet package versions.

Additionally, the Xamarin.AndroidX.Browser NuGet package:
[Xamarin.AndroidX.Browser/1.0.0][0] has a dependency on
Xamarin.AndroidX.Legacy.Support.Core.UI, which eventully pulls in
Xamarin.AndroidX.DocumentFile. [Xamarin.AndroidX.Browser/1.8.0.10][1]
*does not*.  The Xamarin.AndroidX.Legacy.Support.Core.UI dependency
was removed in Xamarin.AndroidX.Browser/1.2.0.

Fix a CS0246 error in `StorageFolder.saf.Android.cs` by explicitly
adding a reference to Xamarin.AndroidX.DocumentFile.

Finally, fix some nullability and `[Obsolete]` errors caused by using
a newer Xamarin.AndroidX.DocumentFile package.

[0]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.0.0#dependencies-body-tab
[1]: https://www.nuget.org/packages/Xamarin.AndroidX.Browser/1.8.0.10#dependencies-body-tab
@github-actions
Copy link

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or it will be closed in 10 days.

@github-actions github-actions bot added the stale This item has been marked as stale and will be closed if there is no activity. label Oct 11, 2025
@github-actions
Copy link

This PR was closed because it has been stalled for 10 days with no activity.

@github-actions github-actions bot closed this Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure area/sdk Categorizes an issue or PR as relevant to the Uno.Sdk area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/solution-templates Categorizes an issue or PR as relevant to the solution template platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform stale This item has been marked as stale and will be closed if there is no activity.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants