Skip to content

chore: try building src/SolutionTemplate/5.2 against .NET 9#21171

Closed
jonpryor wants to merge 2 commits intomasterfrom
dev/jonp/jonp-try-uno52App-with-net9
Closed

chore: try building src/SolutionTemplate/5.2 against .NET 9#21171
jonpryor wants to merge 2 commits intomasterfrom
dev/jonp/jonp-try-uno52App-with-net9

Conversation

@jonpryor
Copy link
Contributor

Context: #21140

The e.g. Tests - Templates > macOS Tests group_2 job is failing when trying to use .NET 10 Preview 6, but @jonpryor believes the actual issue is that src/SolutionTemplate/5.2 won't build as expected under .NET 9, in part because the semantics of $(WasmShellOutputPackagePath) changed

  • WasmShellOutputPackagePath has been removed. Use $(PublishDir)

Further local investigation suggests that there is an issue with transitive dependencies: in .NET 8,
uno52AppWithLib/uno52lib/Assets/test.xml is part of @(Content) and the <ShellTask_v7e353b3ac4979ac8530369a662f6f44fec52c0bf/> task copies it into $(WasmShellOutputPackagePath).

Under .NET 9, the _UnoAddAssetsFilesToPublishDirectory target removes test.xml from the @(ContentWithTargetPath) item group, so when it is copied into $(OutputPath), it is not underneath $(WasmShellOutputPackagePath):

% find bin/Debug/net9.0-browserwasm -iname test.xml
bin/Debug/net9.0-browserwasm/uno52lib/Assets/test.xml

Does CI see the same thing?

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 ℹ️

@github-actions github-actions bot added the area/solution-templates Categorizes an issue or PR as relevant to the solution template label Jul 29, 2025
Context: #21140

The e.g. **Tests - Templates > macOS Tests group_2** job is failing
when trying to use .NET 10 Preview 6, but @jonpryor believes the
*actual* issue is that `src/SolutionTemplate/5.2` won't build as
expected under *.NET 9*, in part because the semantics of
[`$(WasmShellOutputPackagePath)` changed][0]

> - `WasmShellOutputPackagePath` has been removed. Use `$(PublishDir)`

Further local investigation suggests that there is an issue with
*transitive dependencies*: in .NET 8,
`uno52AppWithLib/uno52lib/Assets/test.xml` is part of `@(Content)`
and the `<ShellTask_v7e353b3ac4979ac8530369a662f6f44fec52c0bf/>`
task copies it into `$(WasmShellOutputPackagePath)`.

Under .NET 9, the `_UnoAddAssetsFilesToPublishDirectory` target
*removes* `test.xml` from the `@(ContentWithTargetPath)` item group,
so when it is copied into `$(OutputPath)`, it is *not* underneath
`$(WasmShellOutputPackagePath)`:

	% find bin/Debug/net9.0-browserwasm -iname test.xml
	bin/Debug/net9.0-browserwasm/uno52lib/Assets/test.xml

Does CI see the same thing?

[0]: https://github.com/unoplatform/Uno.Wasm.Bootstrap/blob/4ee6887ba181020c959ceedc05df7a3cab86650c/doc/using-the-bootstrapper.md?plain=1#L139
@jonpryor jonpryor force-pushed the dev/jonp/jonp-try-uno52App-with-net9 branch from aadb2d3 to 7369c06 Compare July 29, 2025 18:51
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21171/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-21171/wasm-skia-net9/index.html

@unodevops
Copy link
Contributor

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

The **Tests - Templates > macOS Tests group_2 > Run Project Templates Tests**
step fails with:

	/Users/runner/work/1/s/.dotnet/sdk/9.0.200/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5):
	error NETSDK1005: Assets file '/Users/runner/work/1/s/src/SolutionTemplate/5.2/uno52Lib/obj/project.assets.json' doesn't have a target for 'net8.0'. Ensure that restore has run and that you have included 'net8.0' in the TargetFrameworks for your project.
	[/Users/runner/work/1/s/src/SolutionTemplate/5.2/uno52Lib/uno52Lib.csproj::TargetFramework=net8.0]

It errors out with NETSDK1005 because it's being built via
`run-netcore-mobile-template-tests.ps1`, which explicitly provides
`dotnet build -f FRAMEWORK` values:

	@(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-f", "net8.0"), @("macOS", "NetCore")),

Consequently, we need to either *re-add* .NET 8 targets to
`$(TargetFrameworks)` within `src/SolutionTemplate/5.2`, *or*
update `run-netcore-mobile-template-tests.ps1`/etc. to *not* build
under .NET 8.

As we're attempting to show behavioral differences between .NET 8
and .NET 9 for this project, *not building under .NET 8* defeats the
point!  Thus, re-add .NET 8 targets to `src/SolutionTemplate/5.2`.
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-21171/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-21171/wasm-skia-net9/index.html

@nventive-devops
Copy link
Contributor

The build 172520 found UI Test snapshots differences: android-28-net8: 27, android-28-net8-Snap: 46, ios: 4, ios-Snap: 65, skia-linux-screenshots: 83, skia-windows-screenshots: 837, wasm: 47, 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: 1, wasm-automated-net9.0-WinUI-RuntimeTests-2: 0

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DecimalFormatterTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Detereminate_ProgressRing_Validation25_[#FF0000_#008000_#FF0000_#FF0000]_Progress-Ring-Value-25
    • Detereminate_ProgressRing_Validation50_[#FF0000_#008000_#008000_#FF0000]_Progress-Ring-Value-50
    • Detereminate_ProgressRing_Validation75_[#FF0000_#008000_#008000_#008000]_Progress-Ring-Value-75
    • FlyoutTest_When_NoOverlayInputPassThroughElement_Then_DontPassThrough_woOff_UITests_Shared_Windows_UI_Xaml_Controls_Flyout_Flyout_OverlayInputPassThroughElement
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • LoadEmptyContentControl_SamplesApp_Windows_UI_Xaml_Controls_ContentControlNoTemplateNoContent
    • NavigateBackAndForthBetweenMenuItemsAndSettings_Fluent_SamplesApp_Samples_Microsoft_UI_Xaml_Controls_NavigationViewTests_FluentStyle_FluentStyle_NavigationViewSample
    • SequentialAnimations_SamplesApp_Windows_UI_Xaml_Media_Animation_SequentialAnimationsPage
    • NativeCommandBar_Size_Uno_UI_Samples_Content_UITests_CommandBar_CommandBar_Dynamic
    • UpDownEnabledTest_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • SelectionTest_UITests_Microsoft_UI_Xaml_Controls_RadioButtonsTests_RadioButtonsPage
    • When_Bound_To_GlobalThemedResources_UITests_Shared_Windows_UI_Xaml_ThemeResources_AppXamlDefinedResources
    • When_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • WebView_NavigateToAnchor_click_anchor
    • WebView_NavigateToAnchor_Initial
    • WebView_NavigateToAnchor_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • WebView_NavigateToAnchor_navigate_to_anchor
    • When_Parent_PointerMoved_After_drag_on_ScrollViewer_-_touch
    • When_SingleSelectionWithItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
  • android-28-net8-Snap: 46 changed over 1074

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Image_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons_UITests_Windows_UI_Xaml_Controls_ImageTests_SvgImageSource_Icons
    • MUX_NumberBox_UITests_Shared_Microsoft_UI_Xaml_Controls_NumberBoxTests_NumberBoxPage
    • Microsoft_UI_Composition_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple_UITests_Shared_Windows_UI_Composition_SKCanvasElement_Simple
    • SplitView_BindableDrawerLayout_ChangePane_UITests_Windows_UI_Xaml_Controls_SplitView_BindableDrawerLayout_ChangePane
    • SplitView_UITests_Windows_UI_Xaml_Controls_SplitView_SplitViewClip_UITests_Windows_UI_Xaml_Controls_SplitView_SplitViewClip
    • Default_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation_Uno_UI_Samples_Content_UITests_WebView_WebView_AnchorNavigation
    • SwipeControl_UITests_Windows_UI_Xaml_Controls_SwipeControlTests_SwipeControl_ListView_ItemClick_UITests_Windows_UI_Xaml_Controls_SwipeControlTests_SwipeControl_ListView_ItemClick
    • NavigationView_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage_MUXControlsTestApp_NavigationViewCustomThemeResourcesPage
    • Shapes_LinePage_SamplesApp_Windows_UI_Xaml_Shapes_LinePage
    • Shapes_Measure_UITests_Shared_Windows_UI_Xaml_Shapes_MeasurePage
    • Border_Border_CornerRadius_Alignments_Uno_UI_Samples_UITests_BorderTestsControl_Border_CornerRadius_Alignments
    • Brushes_ImageBrushChangingCornerRadius_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushChangingCornerRadius
    • Border_Border_Corner_Overlap_UITests_Shared_Windows_UI_Xaml_Controls_BorderTests_Border_CornerOverlap
    • CommandBarFlyout_MUXControlsTestApp_CommandBarFlyoutPage_MUXControlsTestApp_CommandBarFlyoutPage
    • ListView_ListViewSelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • Border_Border_AntiAlias_UITests_Windows_UI_Xaml_Controls_BorderTests_BorderAntiAlias
    • TextBlock_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout_UITests_Shared_Windows_UI_Xaml_Controls_TextBlockControl_TextBlock_Layout
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • TextBox_TextBox_Keyboard_Dismiss_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Keyboard_Dismiss
    • TextBox_TextBox_Padding_In_Style_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Padding_In_Style
  • 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
    • When_SingleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • ProgressRing_IsEnabled_Running_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
    • ProgressRing_Visibility_Collapsed_UITests_Windows_UI_Xaml_Controls_ProgressRing_WindowsProgressRing_GH1220
  • ios-Snap: 65 changed over 991

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Brushes_ImageBrushWithCompositeTransform_Uno_UI_Samples_UITests_ImageBrushTestControl_ImageBrushWithCompositeTransform
    • Brushes_PathImageBrushfill_Uno_UI_Samples_UITests_ImageBrushTestControl_PathImageBrushfill
    • ContentControl_ContentControl_Nested_TemplatedParent_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_Nested_TemplatedParent
    • Brushes_EllipsemaskingEllipseGrid_Uno_UI_Samples_UITests_ImageBrushTestControl_EllipsemaskingEllipseGrid
    • ContentControl_ContentControl_SelectorInheritance_Uno_UI_Samples_Content_UITests_ContentControlTestsControl_ContentControl_SelectorInheritance
    • Default_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected_SamplesApp_Wasm_Windows_UI_Xaml_Controls_ListView_ListView_IsSelected
    • GridView_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped_GenericApp_Views_Samples_Shared_Content_UITests_GridViewGrouped
    • ListView_ListView_With_ListViews_Count_Measure_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_With_ListViews_Count_Measure
    • Icons_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground_UITests_Shared_Windows_UI_Xaml_Controls_BitmapIconTests_BitmapIcon_Foreground
    • NavigationView_MUXControlsTestApp_NavigationViewMenuItemStretchPage_MUXControlsTestApp_NavigationViewMenuItemStretchPage
    • ListView_ListView_Aligned_Left_UITests_Shared_Windows_UI_Xaml_Controls_ListView_ListView_Aligned_Left
    • NavigationView_MUXControlsTestApp_NavigationViewMinimalPage_MUXControlsTestApp_NavigationViewMinimalPage
    • Pickers_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • SwipeControl_MUXControlsTestApp_SwipeControlPage2_MUXControlsTestApp_SwipeControlPage2
    • TextBox_TextBox_Disabled_State_Uno_UI_Samples_Content_UITests_TextBoxControl_TextBox_Disabled_State
    • ColorPicker_ColorPickerSample_UITests_Microsoft_UI_Xaml_Controls_ColorPickerTests_ColorPickerSample
    • 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
    • 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
    • NavigationView_NavigationViewSample_SamplesApp_Samples_NavigationViewSample_NavigationViewSample
    • NavigationView_NavigationView_Tapped_UITests_Shared_Windows_UI_Xaml_Controls_NavigationViewTests_NavigationView_Tapped
  • skia-linux-screenshots: 83 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ImageBrushAlignmentXY2.png-dark
    • ImageBrushAlignmentXY2.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Examples.png-dark
    • Examples.png
    • ClipboardTests.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Buttons.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • CalendarView_Theming.png-dark
    • ButtonClippingTestsControl.png-dark
  • skia-windows-screenshots: 837 changed over 2282

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppBarButtonWithIconTest.png-dark
    • AppWindowClosing.png-dark
    • AppWindowPresenters.png-dark
    • Attributed_text_Supserscript.png
    • BasicEnability.png-dark
    • CheckBox_Button_UWA_Style.png
    • ComboBox_MaxDropdownHeight.png-dark
    • ComboBox_MaxDropdownHeight.png
    • CommandBar_Primary_And_Secondary.png-dark
    • CommandBar_Primary_And_Secondary.png
    • ContentPresenter_Background.png-dark
    • ContentPresenter_Background.png
    • ContentPresenter_Content_DataContext.png-dark
    • ContentPresenter_Content_DataContext.png
    • Grid_Style_Local_Override.png-dark
    • Grid_Style_Local_Override.png
    • Grid_Two_bottom_row_Auto__middle_col_auto.png-dark
    • Grid_Two_bottom_row_Auto__middle_col_auto.png
    • AppWindowClosing.png
  • wasm: 47 changed over 1056

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Microsoft_UI_Xaml_Controls.TabViewTests.TabViewPage
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_ChangeView
    • UITests.Shared.Windows_UI_Xaml_Controls.ListView.ListView_DataContext_Propagation
    • UITests.Windows_UI_Xaml_Controls.SwipeControlTests.SwipeControl_ListView_ItemClick
    • MUXControlsTestApp.ExtraCommandBarFlyoutPage
    • UITests.Shared.Windows_UI.Xaml_Automation.AutomationProperties_AutomationId
    • UITests.Shared.Windows_UI_Composition.SKCanvasElement_Simple
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ComboBox.ComboBox_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewIncrementalLoading
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_ItemContainerStyleSelector
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_ItemTemplateSelector_And_ItemContainerStyleSelector
    • UITests.Shared.Windows_UI_Xaml_Controls.ContentDialogTests.ContentDialog_Simple
    • UITests.Windows_UI_Xaml_Controls.ListView.ListViewItem_Click_Focus
    • Uno.UI.Samples.Content.UITests.ButtonTestsControl.AppBar_KeyBoard
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListView_Expandable_Item
    • UITests.Uno_Web.Http.CookieManagerTests
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Shared.Windows_UI_Xaml.Clipping.ClippingWithOpacity
    • UITests.Shared.Windows_UI_Xaml_Controls.AutoSuggestBoxTests.AutoSuggestBoxChosenSuggestion
    • UITests.Shared.Windows_UI_Xaml_Controls.ComboBox.ComboBox_SelectedIndex
  • 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) 🚨🚨
    • TestProgressRing_InitialState_UITests_Microsoft_UI_Xaml_Controls_ProgressRing_WinUIProgressRing_Features
    • ListView_SelectedItems_SamplesApp_Windows_UI_Xaml_Controls_ListView_ListViewSelectedItems
    • When_NoSelection_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_SingleSelectionWithoutItemClick_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_ExtendedSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • Default_StrokeThickness_MyPolyline
    • Default_StrokeThickness_MyPolygon
    • Default_StrokeThickness_MyEllipse
    • Default_StrokeThickness_MyPath
    • When_Theme_Changed_No_Crash_UITests_Windows_UI_Xaml_Controls_CalendarView_CalendarView_Theming
    • Default_StrokeThickness_MyRect
    • Default_StrokeThickness_MyLine
    • When_MultipleSelectionWithoutItemClick_Then_PointersEvents_UITests_Windows_UI_Xaml_Controls_ListView_ListView_Selection_Pointers
    • When_TransformToVisual_ScrollViewer_UITests_Shared_Windows_UI_Xaml_UIElementTests_TransformToVisual_ScrollViewer
  • wasm-automated-net9.0-WinUI-RuntimeTests-0: 0 changed over 1

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

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • RunRuntimeTests_SamplesApp_Samples_UnitTests_UnitTestsPage
  • wasm-automated-net9.0-WinUI-RuntimeTests-2: 0 changed over 1

@jonpryor
Copy link
Contributor Author

jonpryor commented Aug 1, 2025

…and now, it fails as anticipated: Tests - Templates > macOS Tests group_2 job fails when building against .NET 9:

/Users/runner/work/1/s/src/SolutionTemplate/5.2/uno52NuGetLib/uno52NuGetLib.csproj(106,3): error : Missing asset obj/Debug/__NuGetPackage/lib/net9.0-android34.0/uno52NuGetLib/Assets/test.xml

@unodevops
Copy link
Contributor

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

@github-actions
Copy link

github-actions bot commented Oct 1, 2025

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 1, 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 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/solution-templates Categorizes an issue or PR as relevant to the solution template 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.

3 participants