Skip to content

chore: .NET10 + Android + CS0246 fixes#21230

Merged
jeromelaban merged 1 commit intomasterfrom
dev/jonpryor/jonp-net10+cs0234-fixes
Aug 11, 2025
Merged

chore: .NET10 + Android + CS0246 fixes#21230
jeromelaban merged 1 commit intomasterfrom
dev/jonpryor/jonp-net10+cs0234-fixes

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Aug 8, 2025

Context: dotnet/android@70bd636b

As part of .NET 10, .NET for Android introduced a new Microsoft.Android.Runtime namespace. This causes lots of CS0234 errors across the uno codebase:

// Android.Views.Window Window => …
error CS0234: The type or namespace name 'Views' does not exist in the namespace 'Microsoft.Android' (are you missing an assembly reference?)

While this requires .NET 10 to get the error, it doesn't require .NET 10 to preemptively fix the error. (And preemptively fixing the error reduces the size of .NET 10 PRs…)

The CS0234 error can be fixed in (at least) three ways:

  1. Instead of a full type name such as Android.Views.Window, add a top-level using Android.Views and then only use Window.

    This approach only works if there is no other Window type in scope…which is not the case Window, but may be the case for other types such as GravityFlags.

  2. Use global::, e.g. global::Android.Views.Window. This works, but quickly gets verbose and unwieldy.

  3. C# 10 global using directives for aliases:

    global using AWindow = Android.Views.Window;
    

    then use AWindow when Android.Views.Window is needed.

Add a new src/Uno.UI/GlobalUsings.cs file which contains global using … statements for the most commonly used types which trigger CS0234 errors -- AApplication, AButton, AWindow, etc. -- and use a complication of (1) and (3) to fix the CS0234 errors.

Aside: Why a A prefix? For two reasons: (1) "A is for Android", and (2) the aliases need to be "unique". "Real" types take precedence over using aliases; if we had using Window = Android.Views.Window, it would not matter within a Microsoft.UI.Xaml namespace or sub- namespace, as Window will always mean Microsoft.UI.Xaml.Window.

"While in the area", fix some new-in-.NET 10 IDE0055 warnings; apparently a blank line is now required between a namespace declaration and a type declaration.

Also fix some nullability warnings from the .NET 10 iOS bits.

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: dotnet/android@70bd636b

As part of .NET 10, .NET for Android introduced a new
`Microsoft.Android.Runtime` namespace.  This causes lots of CS0234
errors across the uno codebase:

	// Android.Views.Window Window => …
	error CS0234: The type or namespace name 'Views' does not exist in the namespace 'Microsoft.Android' (are you missing an assembly reference?)

While this requires .NET 10 to get the error, it doesn't require
.NET 10 to preemptively *fix* the error.  (And preemptively fixing
the error reduces the size of .NET 10 PRs…)

The CS0234 error can be fixed in (at least) three ways:

 1. Instead of a full type name such as `Android.Views.Window`,
    add a top-level `using Android.Views` and then only use
    `Window`.

    This approach only works if there is no other `Window` type in
    scope…which is *not* the case `Window`, but may be the case for
    other types such as `GravityFlags`.

 2. Use `global::`, e.g. `global::Android.Views.Window`.
    This *works*, but quickly gets verbose and unwieldy.

 3. [C# 10 `global using` directives][0] for `alias`es:

        global using AWindow = Android.Views.Window;

    then use `AWindow` when `Android.Views.Window` is needed.

Add a new `src/Uno.UI/GlobalUsings.cs` file which contains
`global using …` statements for the most commonly used types which
trigger CS0234 errors -- `AApplication`, `AButton`, `AWindow`, etc. --
and use a complication of (1) and (3) to fix the CS0234 errors.

Aside: Why a `A` prefix? For two reasons: (1) "A is for Android", and
(2) the aliases need to be "unique".  "Real" types take precedence over
`using` aliases; if we had `using Window = Android.Views.Window`,
*it would not matter* within a `Microsoft.UI.Xaml` namespace or sub-
namespace, as `Window` will *always* mean `Microsoft.UI.Xaml.Window`.

"While in the area", fix some new-in-.NET 10 IDE0055 warnings;
apparently a blank line is now required between a `namespace`
declaration and a type declaration.

Also fix some nullability warnings from the .NET 10 iOS bits.

[0]: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/using-directive#the-global-modifier
@github-actions github-actions bot added platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/code-generation Categorizes an issue or PR as relevant to code generation area/automation Categorizes an issue or PR as relevant to project automation labels Aug 8, 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-21230/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

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

@unodevops
Copy link
Contributor

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

@nventive-devops
Copy link
Contributor

The build 173169 found UI Test snapshots differences: android-28-net8: 22, android-28-net8-Snap: 34, ios: 4, ios-Snap: 52, skia-linux-screenshots: 84, skia-windows-screenshots: 699, wasm: 46, wasm-automated-net9.0-WinUI-Benchmarks-automated: 0, wasm-automated-net9.0-WinUI-Default-automated: 16, wasm-automated-net9.0-WinUI-RuntimeTests-0: 0, wasm-automated-net9.0-WinUI-RuntimeTests-1: 0, wasm-automated-net9.0-WinUI-RuntimeTests-2: 1

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_NoSelection_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • WebView_NavigateToAnchor_click_anchor
    • WebView_NavigateToAnchor_Initial
    • WebView_NavigateToAnchor_navigate_to_anchor
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • When_Parent_PointerMoved_After_drag_on_non-scrolling_ScrollViewer
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • NavigateBackAndForthBetweenMenuItemsAndSettings_Fluent_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • WebView_NavigateToAnchor_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • android-28-net8-Snap: 34 changed over 1074

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse_Uno_UI_Samples_UITests_ImageBrushTestControl_Ellipse
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • Border_BorderCenteredwithmargins_Uno_UI_Samples_UITests_BorderTestsControl_BorderCenteredwithmargins
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Border_Border_AntiAlias_UITests_Windows_UI_Xaml_Controls_BorderTests_BorderAntiAlias
    • Border_Border_Simple_No_Background_With_TextBox_Uno_UI_Samples_UITests_BorderTestsControl_Border_Simple_No_Background_With_TextBox
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons
    • NavigationView_MUXControlsTestApp_NavigationViewRS4Page_MUXControlsTestApp_NavigationViewRS4Page
    • CommandBarFlyout_MUXControlsTestApp_CommandBarFlyoutPage_MUXControlsTestApp_CommandBarFlyoutPage
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • NavigationView_MUXControlsTestApp_NavigationViewTopNavPage_MUXControlsTestApp_NavigationViewTopNavPage
    • Border_Border_CornerRadius_Alignments_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Alignments
    • Border_Border_CornerRadius_BorderThickness_UITests_Windows_UI_Xaml_Controls_BorderTests_Border_CornerRadius_BorderThickness
    • Microsoft_UI_Composition_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple
    • Transform_Basics_UITests_Shared_Windows_UI_Xaml_Media_Transform_Basics
    • MUX_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage_UITests_Shared_Microsoft_UI_Xaml_Controls_TreeViewTests_TreeViewPage
    • MediaPlayerElement_Mini_player_UITests_Shared_Windows_UI_Xaml_Controls_MediaPlayerElement_MediaPlayerElement_Minimal
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • NavigationView_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage
  • ios: 4 changed over 256

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Check_ListView_Swallows_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • ios-Snap: 52 changed over 991

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_PanelImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_PanelImageBrush
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • NavigationView_FluentStyle_NavigationViewSample_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • Brushes_GenericApp_Views_Content_UITests_ImageBrushTestControl_BorderImageBrushRelativeTransform_GenericApp_Views_Content_UITests_ImageBrushTestControl_BorderImageBrushRelativeTransform
    • GridView_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped
    • Grid_CenteredGridinGridwiththreefixedsizechildren_Uno_UI_Samples_Content_UITests_GridTestsControl_CenteredGridinGridwiththreefixedsizechildren
    • Popup_MessageDialog_UITests_Shared_Windows_UI_Xaml_Controls_Popup_MessageDialog
    • Brushes_BorderImageBrush_Uno_UI_Samples_UITests_ImageBrushTestControl_BorderImageBrush
    • ContentControl_ContentControl_SelectorInheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SelectorInheritance
    • ListView_ListView_KeyboardInterception_UITests_Windows_UI_Xaml_Controls_ListView_ListView_KeyboardInterception
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • Image_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal_UITests_Shared_Windows_UI_Xaml_Controls_ImageTests_Image_Stretch_Algmnt_Inf_Horizontal
    • NavigationView_NavigationViewSample_SamplesApp_Samples_NavigationViewSample_NavigationViewSample
    • Performance_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering_UITests_Windows_UI_Xaml_Performance_Performance_1000ButtonsContinuousRendering
    • Buttons_Custom_Button_With_ContentTemplate_Uno_UI_Samples_Content_UITests_ButtonTestsControl_Custom_Button_With_ContentTemplate
    • ContentControl_ContentControl_Nested_TemplatedParent_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Nested_TemplatedParent
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • Grid_Grid_DataBound_ColumnRow_Definitions_Uno_UI_Samples_Content_UITests_GridTestsControl_Grid_DataBound_ColumnRow_Definitions
    • NavigationView_NavigationView_Tapped_UITests_Shared_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Tapped
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats_UITests_Windows_UI_Xaml_Controls_ImageTests_Image_Formats
  • skia-linux-screenshots: 84 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ClipboardTests.png
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • ClipboardTests.png-dark
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • ImageBrushAlignmentXY2.png-dark
    • ImageBrushAlignmentXY2.png
    • ImageBrushInList.png-dark
    • ImageBrushInList.png
    • ImageIconPage.png-dark
    • ButtonClippingTestsControl.png-dark
    • DisplayInformation.png-dark
    • DisplayInformation.png
  • skia-windows-screenshots: 699 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AnimatedIconPage.png
    • AppBarButtonWithIconTest.png-dark
    • AppBarToggleButtonTest.png-dark
    • AppWindowPositionAndSize.png-dark
    • Attributed_text_Supserscript.png
    • BasicEnability.png
    • Basics Pivot Test.png-dark
    • ClippingToControlBounds.png-dark
    • ClippingToControlBounds.png
    • ContentControl_NoTemplateDataContext.png-dark
    • ContentControl_NoTemplateDataContext.png
    • Custom_Button_With_ContentTemplate_And_StackPanel.png-dark
    • Custom_Button_With_ContentTemplate_And_StackPanel.png
    • DataContextProperty.png-dark
    • DataContextProperty.png
    • Expander_Bindings_TemplatedControl.png-dark
    • Expander_Bindings_TemplatedControl.png
    • Grid_Multi_Column_Span.png-dark
    • Grid_Multi_Column_Span.png
  • wasm: 46 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_DropDownPlacement
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_Basic
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_FromMsAppData
    • UITests.Windows_UI_Xaml_Controls.ImageTests.SvgImageSource_FromStream
    • MUXControlsTestApp.CommandBarFlyoutMainPage
    • MUXControlsTestApp.ExtraCommandBarFlyoutPage
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_DataTemplateSelector
    • UITests.Windows_UI_Xaml.Performance.Performance_1000ButtonsContinuousRendering
    • UITests.Windows_UI_Xaml_Controls.ComboBox.ComboBox_Stretch
    • UITests.Microsoft_UI_Xaml_Controls.RadioButtonsTests.RadioButtonsBasicPage
    • Uno.UI.Samples.Content.UITests.ContentControlTestsControl.ContentControl_Inheritance
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • Uno.UI.Samples.Content.UITests.GridView.GridViewFirstVisibleIndex
    • UITests.Microsoft_UI_Xaml_Controls.InfoBadgeTests.InfoBadgePage
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_SelectedIndex
    • UITests.Shared.Windows_UI_Xaml_Controls.CommandBar.CommandBar_Xaml_Automated
    • UITests.Windows_UI_Xaml_Controls.ListView.ListViewItem_IsEnabled
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.AppBar_KeyBoard
  • wasm-automated-net9.0-WinUI-Benchmarks-automated: 0 changed over 1

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyPolyline
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • Default_StrokeThickness_MyPath
    • Default_StrokeThickness_MyEllipse
    • Default_StrokeThickness_MyPolygon
    • Default_StrokeThickness_MyRect
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyLine
    • When_NoSelectionWithItemClick_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_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
  • 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: 1 changed over 1

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • RunRuntimeTests_SamplesApp_Samples_UnitTests_UnitTestsPage

@jeromelaban jeromelaban merged commit 1826f1b into master Aug 11, 2025
92 checks passed
@jeromelaban jeromelaban deleted the dev/jonpryor/jonp-net10+cs0234-fixes branch August 11, 2025 15:52
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 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: #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: #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: #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: #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: #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: #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: #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: #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*.
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/code-generation Categorizes an issue or PR as relevant to code generation area/skia ✏️ Categorizes an issue or PR as relevant to Skia platform/android 🤖 Categorizes an issue or PR as relevant to the Android platform platform/ios 🍎 Categorizes an issue or PR as relevant to the iOS platform platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants