Skip to content

chore: Replace SamplesApp shared projects with .props imports - #23186

Merged
MartinZikmund merged 10 commits into
masterfrom
dev/mazi/sharedprojs
May 18, 2026
Merged

MartinZikmund merged 10 commits into
masterfrom
dev/mazi/sharedprojs

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

GitHub Issue: closes #12042

PR Type:

🔄 Refactoring (no functional changes, no api changes)

What changed? 🚀

Eliminates four .shproj (shared project) usages across the SamplesApp and source generator infrastructure, replacing them with plain MSBuild .props imports. The compile-into-each-consumer semantics are fully preserved (internal types, partial classes, per-head XAML codegen) — heads still produce identical assemblies — but the projitems registration step disappears: new sample files are now auto-discovered by glob.

The folder src/SamplesApp/UITests.Shared/ is also renamed to src/SamplesApp/SamplesApp.Samples/ for clarity. The 3366 file moves are pure renames (verified by Git rename detection at 100% similarity), so per-file history is preserved across the rename — git log --follow src/SamplesApp/SamplesApp.Samples/<any-file> traces history through.

Migrations (one shproj per commit, reviewable independently):

  1. SourceGeneratorHelpers.shproj → .props (3 generator consumers, all netstandard2.0)
  2. SamplesApp.UnitTests.Shared.shproj → .props (5 consumers; deleted empty SampleChooserViewModel.UIKit.cs)
  3. SamplesApp.Shared.shproj → .props (5 consumers; App.xaml root)
  4. UITests.Shared.shproj → .props (5 consumers; 3033 sample files; biggest validation surface)
  5. Folder rename UITests.Shared → SamplesApp.Samples (pure renames, 16 path-reference updates in non-sample files)
  6. Fix: explicit Link metadata using %(RecursiveDir)%(Filename)%(Extension) so Content/Page items pulled in via <Import> keep their folder structure (the implicit Link the shproj mechanism provided is no longer applied)
  7. New SamplesApp.Samples.csproj (with <NoBuild>true</NoBuild>) so VS Solution Explorer treats the folder as a real project — "Add → New Item" creates files directly under SamplesApp.Samples/<folder>/ and the heads' .props glob picks them up automatically. Registered in Uno.UI.slnx and the four .slnf files.

Out of scope (intentional, by user direction):

  • MyAppXamlTrim.Shared.shproj (separate solution, lives in its own world)
  • UnoIslands.Shared.shproj and Benchmarks.Shared.shproj (slated for removal via other work)

Notes:

  • C# namespaces (UITests.Shared.*, UITests.*) are intentionally NOT renamed — only the folder/file path. Test calls like Run(\"UITests.Shared.X.Y.Z\") still resolve correctly.
  • Pinned-commit GitHub URLs (raw.githubusercontent.com/.../<hash>/.../UITests.Shared/) are left unchanged since they point at frozen historical snapshots.
  • 5 incomplete/dead samples that were silently omitted from the old projitems are now explicitly excluded via Compile Remove / Page Remove (e.g., ScrollViewTestHooksHelper.cs, ItemsView_Nested.xaml).
  • Documentation updated: AGENTS.md, working-with-the-samples-apps.md, add-sample skill, constitution.md, code-style.md, creating-tests.md, specs/001-global-xaml-namespaces/tasks.md — the manual projitems registration step is removed.

PR Checklist ✅

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings May 4, 2026 08:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@MartinZikmund MartinZikmund self-assigned this May 4, 2026
@github-actions github-actions Bot added area/build Categorizes an issue or PR as relevant to build infrastructure area/automation Categorizes an issue or PR as relevant to project automation kind/documentation labels May 4, 2026
@MartinZikmund
MartinZikmund enabled auto-merge May 4, 2026 08:19
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 210528 did not find any UI Test snapshots differences.

@unodevops

Copy link
Copy Markdown
Contributor

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

Copilot AI review requested due to automatic review settings May 13, 2026 20:02
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/sharedprojs branch from aebcffd to 11dbeff Compare May 13, 2026 20:02

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 212456 found UI Test snapshots differences: skia-linux-screenshots: 61, skia-windows-screenshots: 89, wasm: 9

Details
  • skia-linux-screenshots: 61 changed over 2346

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • DropDownButtonPage.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ClipboardTests.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ImageBrush_Stretch.png-dark
  • skia-windows-screenshots: 89 changed over 2346

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • HitTest_Clipping.png-dark
    • HitTest_Clipping.png
    • HitTest_Control.png-dark
    • HitTest_Control.png
    • HitTest_GeometryGroup.png-dark
    • HitTest_GeometryGroup.png
    • HitTest_Image.png-dark
    • HitTest_Image.png
    • DoubleTappedTests.png-dark
    • DoubleTappedTests.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Examples.png
    • ButtonClippingTestsControl.png
    • Buttons.png-dark
    • GestureEventsCommons.png-dark
    • GestureEventsCommons.png
    • ButtonClippingTestsControl.png-dark
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • DoubleImageBrushInList.png-dark
  • wasm: 9 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • initial_state
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • MUXControlsTestApp.SwipeControlPage2
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.ImageTests.Image_Stretch_Algmnt_Inf_Vertical

@unodevops

Copy link
Copy Markdown
Contributor

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

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 212546 found UI Test snapshots differences: skia-linux-screenshots: 61, skia-windows-screenshots: 436, wasm: 9

Details
  • skia-linux-screenshots: 61 changed over 2346

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • CalendarView_Theming.png-dark
    • ClipboardTests.png-dark
    • DisplayInformation.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Buttons.png-dark
    • Buttons.png
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
  • skia-windows-screenshots: 436 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppWindowTitleBar Properties.png-dark
    • AuthenticationBroker_Demo.png
    • CommandBar_Primary_And_Secondary.png-dark
    • CommandBar_Primary_And_Secondary.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ImageIconPage.png-dark
    • ImageIconPage.png
    • ElevatedView_Tester.png-dark
    • ElevatedView_Tester.png
    • Elevation.png-dark
    • Elevation.png
    • AutomationPropertiesExtensions_Role.png-dark
    • Buttons.png-dark
    • ElevatedViewTests.png-dark
    • ElevatedViewTests.png
    • ElevatedView_BorderThickness.png-dark
    • ElevatedView_BorderThickness.png
    • FluentStyle_NavigationViewSample.png-dark
  • wasm: 9 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • MUXControlsTestApp.SwipeControlPage2
    • initial_state
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_UI_Xaml_Controls.ImageTests.Image_Stretch_Algmnt_Inf_Vertical

@unodevops

Copy link
Copy Markdown
Contributor

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

@MartinZikmund

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 212594 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 543, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ClipboardTests.png-dark
    • CalendarView_Theming.png
    • Focus_FocusVisual_Properties.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Buttons.png-dark
    • Buttons.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ImageIconPage.png-dark
    • DisplayInformation.png-dark
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 543 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AppWindowTitleBar Properties.png
    • ApplicationViewSizing.png-dark
    • AuthenticationBroker_Demo.png
    • AppWindowPositionAndSize.png-dark
    • Battery.png
    • BorderVisualClipping.png-dark
    • BorderVisualClipping.png
    • ContentPresenter_NativeEmbedding_ZIndex.png-dark
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • ContentPresenter_Padding.png-dark
    • DataContextProperty.png-dark
    • ContentPresenter_Padding.png
    • DataContextProperty.png
    • DataTemplate_Update_Sample.png-dark
    • DataTemplate_Update_Sample.png
    • DataTransferManager.png-dark
    • DataTransferManager.png
    • DownloadFileSavePickerTests.png-dark
    • ElevatedView_Dimensions.png-dark
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Uno_Web.Http.CookieManagerTests
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

Copilot AI review requested due to automatic review settings May 17, 2026 12:28
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/sharedprojs branch from afee26b to 48d2690 Compare May 17, 2026 12:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 213030 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 253, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • DisplayInformation.png-dark
    • Buttons.png-dark
    • Buttons.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • Focus_FocusVisual_Properties.png-dark
    • ImageIconPage.png-dark
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ClipboardTests.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Examples.png-dark
    • Examples.png
  • skia-windows-screenshots: 253 changed over 2352

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AppWindowPositionAndSize.png-dark
    • BreadcrumbBarPage.png-dark
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • ContentPresenter_Padding.png-dark
    • ContentPresenter_Padding.png
    • ContentPresenter_Template.png-dark
    • ContentPresenter_Template.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • ExtraCommandBarFlyoutPage.png-dark
    • ExtraCommandBarFlyoutPage.png
    • InfoBadgePage.png-dark
    • InfoBadgePage.png
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png-dark
    • ColorPickerSample.png-dark
    • ColorPickerSample.png
    • ElevatedView_Tester.png-dark
    • ElevatedView_Tester.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Uno_Web.Http.CookieManagerTests
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

@MartinZikmund MartinZikmund added the ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met label May 18, 2026
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 213072 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 514, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ContextRequested.png-dark
    • ContextRequested.png
    • DisplayInformation.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ClipboardTests.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageIconPage.png-dark
    • Gamepad_CurrentReading.png-dark
    • Gamepad_CurrentReading.png
    • Gamepad_Enumeration.png-dark
    • Gamepad_Enumeration.png
    • Focus_FocusVisual_Properties.png-dark
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
  • skia-windows-screenshots: 514 changed over 2352

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • Accessibility_ScreenReader.png-dark
    • AndroidWindowInsets.png
    • AppWindowPresenters.png-dark
    • ApplicationViewSpanningRectsPage.png
    • AppWindowFeatures.png-dark
    • AppWindowPositionAndSize.png
    • AutomationProperties_Name.png-dark
    • AutomationProperties_Name.png
    • Battery.png-dark
    • BadgeNotificationTests.png-dark
    • BorderVersusPanelClipping.png-dark
    • BitmapIcon_Monochromatic.png-dark
    • ButtonWithClippingAndOffset.png
    • BreadcrumbBarPage.png
    • CalendarView_Theming.png-dark
    • BreadcrumbBarPage.png-dark
    • CustomTitleBar_Tests.png-dark
    • CustomTitleBar_Tests.png
    • DownloadFileSavePickerTests.png-dark
    • DownloadFileSavePickerTests.png
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Uno_Web.Http.CookieManagerTests
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background

Copilot AI review requested due to automatic review settings May 18, 2026 12:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 213104 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 252, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • ContextRequested.png-dark
    • ContextRequested.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • Focus_FocusVisual_Properties.png-dark
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ImageIconPage.png-dark
    • DisplayInformation.png-dark
    • Image_AnimatedWebP.png-dark
    • Image_AnimatedWebP.png
    • ClipboardTests.png-dark
  • skia-windows-screenshots: 252 changed over 2352

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppWindowFeatures.png
    • AppWindowTitleBar Properties.png-dark
    • Focus_FocusVisual_Properties.png-dark
    • Focus_FocusVisual_Properties.png
    • Contacts_Pick.png-dark
    • Contacts_Pick.png
    • ContentPresenter_NativeEmbedding_ZIndex.png-dark
    • ContentPresenter_NativeEmbedding_ZIndex.png
    • ContentPresenter_Padding.png-dark
    • ContentPresenter_Padding.png
    • DisplayInformation.png-dark
    • DisplayInformation.png
    • DoubleImageBrushInList.png-dark
    • DoubleImageBrushInList.png
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • AppWindowFeatures.png-dark
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

MartinZikmund and others added 10 commits May 18, 2026 16:56
Eliminates the .shproj/.projitems shared-project mechanism in favor of a
plain MSBuild .props import. Same compile-into-each-consumer semantics
(internal types remain accessible to each generator assembly).

Updates the 3 consumers (Uno.UI.SourceGenerators,
Uno.UI.SourceGenerators.Internal, Uno.Samples.UITest.Generator) and
removes shproj references from Uno.UI.slnx and 5 .slnf files.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Eliminates the .shproj/.projitems shared-project mechanism in favor of
a .props file with wildcard Compile/Page globs. Same compile-into-each-
consumer semantics; platform-suffix files (.Android.cs, .iOS.cs, etc.)
keep working via their existing #if guards.

Updates the 5 consumers (SamplesApp.Skia, SamplesApp.Wasm,
SamplesApp.Windows, SamplesApp.netcoremobile, UnoIslandsSamplesApp.Skia).
Removes shproj entries from Uno.UI.slnx and 4 .slnf files. Deletes
empty SampleChooserViewModel.UIKit.cs (was 0 bytes, never referenced).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Eliminates the .shproj/.projitems for the SamplesApp shared root
(App.xaml, MainPage.xaml, .resw, assets, embedded resource) in favor
of a .props file with wildcard globs. ApplicationDefinition stays
explicit; Pages, Compile, Content, PRIResource use globs. The embedded
text resource is included explicitly since only one file in Embedded\
is registered as an embedded resource.

Updates the 5 consumers and removes shproj entries from Uno.UI.slnx
and 4 .slnf files.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Eliminates the last UITests.Shared shproj/projitems with a wildcard-based
.props file. The 3033-entry projitems is replaced with globs over
**/*.xaml, **/*.xaml.cs, **/*.cs, plus explicit Content/EmbeddedResource/
PRIResource entries for special folders. ItemExclusions.props (which
removes platform-conditional samples for UWP/WinUI) is preserved and
imported from the new .props.

A small set of incomplete/dead samples that don't compile is excluded
explicitly via Compile/Page Remove items (e.g., ScrollViewTestHooksHelper,
ItemsView_Nested) — these were silently omitted from the old projitems.

Updates the 5 consumers and removes shproj entries from Uno.UI.slnx and
4 .slnf files. Documentation is updated to drop the manual
projitems-registration step (samples are now auto-discovered by glob).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Renames the sample-pages folder and its .props file. Git detects all
3366 file moves as pure renames (no content changes), so per-file
history is preserved (use `git log --follow` to trace any sample
across the rename).

Updates path references in:
- Consumer csprojs (5 SamplesApp heads importing the .props)
- Uno.UI.RuntimeTests/Directory.Build.targets (linked Content path)
- Uno.UI.Tests/Uno.UI.Unit.Tests.csproj (linked Page path)
- SampleChooserContent.cs (GitHub blob URL on master)
- SamplesListGenerator.cs (path-portion marker string)
- AGENTS.md, working-with-the-samples-apps.md, SKILL.md,
  constitution.md, code-style.md, creating-tests.md,
  specs/001-global-xaml-namespaces/tasks.md

C# namespaces (UITests.Shared.*, UITests.*) are intentionally NOT
renamed — only the folder/file path. Pinned-commit GitHub URLs
(`raw.githubusercontent.com/.../<hash>/.../UITests.Shared/`) are
also unchanged since they point at frozen historical snapshots.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The shproj/projitems mechanism implicitly applies Link metadata so that
items imported from a sibling shared folder retain their relative path
(e.g. Assets/TeachingTip.png stays under Assets/). A plain <Import> of
a .props file does not apply this implicit Link, so MSBuild flattens
TargetPath to just the filename — Content files that were under
Assets/ ended up at the consumer's output root.

Adds explicit Link metadata using %(RecursiveDir)%(Filename)%(Extension)
to all wildcard-globbed items in the three migrated .props files
(SamplesApp.Samples, SamplesApp.Shared, SamplesApp.UnitTests.Shared)
so the original folder structure is preserved in the build output and
in Solution Explorer.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds a placeholder SamplesApp.Samples.csproj that VS Solution Explorer
treats as a real project, so "Add → New Item" creates files directly
under SamplesApp.Samples/ in their proper folders. The csproj uses
NoBuild=true and is marked Build=false in the slnx, so it never
compiles. Each SamplesApp head still imports SamplesApp.Samples.props
to actually compile the samples into its own assembly.

Registers the new project in Uno.UI.slnx and the four .slnf files
(Skia, Wasm, Windows, netcoremobile).

Also adds Link metadata to the <None Include> entries in
ItemExclusions.props so platform-conditional samples (Lottie/,
PagerControlTests/, MapPresenter/, ...) appear under their original
folders in Solution Explorer instead of at the project root.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Adds placeholder csproj files for SamplesApp.Shared and
SamplesApp.UnitTests.Shared mirroring the SamplesApp.Samples treatment
introduced earlier. Each csproj is NoBuild=true and Build=false in the
slnx, so VS Solution Explorer surfaces the folder as a real project
where "Add → New Item" lands in the right place, but no actual
compilation runs from these projects. Compilation continues to flow
through the .props imports in each SamplesApp head.

Registers both projects in Uno.UI.slnx and the four .slnf files
(Skia, Wasm, Windows, netcoremobile).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The generator scans sample .cs files via a hardcoded path string;
the rename commit updated SamplesListGenerator.cs but missed this
sibling generator, breaking native test snapshot generation.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@MartinZikmund
MartinZikmund force-pushed the dev/mazi/sharedprojs branch from aaea823 to f1bd088 Compare May 18, 2026 14:56
@unodevops

Copy link
Copy Markdown
Contributor

@nventive-devops

Copy link
Copy Markdown
Contributor

The build 213134 found UI Test snapshots differences: skia-linux-screenshots: 57, skia-windows-screenshots: 700, wasm: 11

Details
  • skia-linux-screenshots: 57 changed over 2348

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • CalendarView_Theming.png-dark
    • CalendarView_Theming.png
    • Buttons.png-dark
    • Buttons.png
    • DisplayInformation.png-dark
    • Examples.png-dark
    • Examples.png
    • ExpanderColorValidationPage.png-dark
    • ExpanderColorValidationPage.png
    • Focus_FocusVisual_Properties.png-dark
    • ElementLevelTheme.png-dark
    • ElementLevelTheme.png
    • ButtonClippingTestsControl.png-dark
    • ButtonClippingTestsControl.png
    • DropDownButtonPage.png-dark
    • DropDownButtonPage.png
    • ImageIconPage.png-dark
    • ContextRequested.png-dark
    • ContextRequested.png
    • Gamepad_CurrentReading.png-dark
  • skia-windows-screenshots: 700 changed over 2352

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • AnimatedIconPage.png-dark
    • AppWindowFeatures.png-dark
    • AppWindowTitleBar Properties.png
    • AuthenticationBroker_Demo.png
    • AutoSuggestBox_Icons.png
    • BitmapIcon_Sizing.png
    • Border_CornerRadius_Gradient.png-dark
    • Border_CornerRadius_Gradient.png
    • Border_Simple_No_Background_With_TextBox.png-dark
    • Border_Simple_No_Background_With_TextBox.png
    • ButtonClippingTestsControl.png-dark
    • ClipboardTests.png-dark
    • ClipboardTests.png
    • DoubleAnimationClipping.png-dark
    • DoubleAnimationClipping.png
    • EmailManagerTests.png-dark
    • EmailManagerTests.png
    • AppWindowFeatures.png
    • AuthenticationBroker_Demo.png-dark
    • AndroidWindowInsets.png-dark
  • wasm: 11 changed over 1076

    🚨🚨 Comparison Details (first 20) 🚨🚨
    • UITests.Windows_UI_Xaml_Controls.CalendarView.CalendarView_Theming
    • UITests.Windows_UI_Xaml_Media_Animation.ColorAnimation_Background
    • SamplesApp.Windows_UI_Xaml_Controls.ListView.ListViewSelectedItems
    • UITests.Shared.Microsoft_UI_Xaml_Controls.ExpanderTests.WinUIExpanderPage
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal
    • UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension
    • SamplesApp.Wasm.Windows_UI_Xaml_Controls.ListView.ListView_IsSelected
    • UITests.Uno_Web.Http.CookieManagerTests
    • UITests.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_NavigationProperties
    • Uno.UI.Samples.Content.UITests.WebView.WebView_AnchorNavigation
    • SamplesApp.Microsoft_UI_Xaml_Controls.WebView2Tests.WebView2_EnableDevTools

@MartinZikmund
MartinZikmund merged commit da96bda into master May 18, 2026
97 checks passed
@MartinZikmund
MartinZikmund deleted the dev/mazi/sharedprojs branch May 18, 2026 19:08
@Youssef1313

Copy link
Copy Markdown
Member

@MartinZikmund This probably should have been an Uno.Sdk single project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/automation Categorizes an issue or PR as relevant to project automation area/build Categorizes an issue or PR as relevant to build infrastructure kind/documentation ready-to-merge Automatically merge the PR once all '.mergify.yml' policies are met

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move SamplesApp away from shared projects to class library

6 participants