Repository navigation
chore: Replace SamplesApp shared projects with .props imports - #23186
Conversation
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 210528 did not find any UI Test snapshots differences. |
|
|
aebcffd to
11dbeff
Compare
|
The build 212456 found UI Test snapshots differences: Details
|
|
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 212546 found UI Test snapshots differences: Details
|
|
|
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 212594 found UI Test snapshots differences: Details
|
afee26b to
48d2690
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 213030 found UI Test snapshots differences: Details
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 213072 found UI Test snapshots differences: Details
|
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 213104 found UI Test snapshots differences: Details
|
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]>
aaea823 to
f1bd088
Compare
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23186/wasm-skia-net9/index.html |
|
The build 213134 found UI Test snapshots differences: Details
|
|
@MartinZikmund This probably should have been an Uno.Sdk single project. |
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.propsimports. The compile-into-each-consumer semantics are fully preserved (internaltypes, 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 tosrc/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):
SourceGeneratorHelpers.shproj→.props(3 generator consumers, allnetstandard2.0)SamplesApp.UnitTests.Shared.shproj→.props(5 consumers; deleted emptySampleChooserViewModel.UIKit.cs)SamplesApp.Shared.shproj→.props(5 consumers; App.xaml root)UITests.Shared.shproj→.props(5 consumers; 3033 sample files; biggest validation surface)UITests.Shared→SamplesApp.Samples(pure renames, 16 path-reference updates in non-sample files)Linkmetadata 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)SamplesApp.Samples.csproj(with<NoBuild>true</NoBuild>) so VS Solution Explorer treats the folder as a real project — "Add → New Item" creates files directly underSamplesApp.Samples/<folder>/and the heads'.propsglob picks them up automatically. Registered inUno.UI.slnxand the four.slnffiles.Out of scope (intentional, by user direction):
MyAppXamlTrim.Shared.shproj(separate solution, lives in its own world)UnoIslands.Shared.shprojandBenchmarks.Shared.shproj(slated for removal via other work)Notes:
UITests.Shared.*,UITests.*) are intentionally NOT renamed — only the folder/file path. Test calls likeRun(\"UITests.Shared.X.Y.Z\")still resolve correctly.raw.githubusercontent.com/.../<hash>/.../UITests.Shared/) are left unchanged since they point at frozen historical snapshots.Compile Remove/Page Remove(e.g.,ScrollViewTestHooksHelper.cs,ItemsView_Nested.xaml).AGENTS.md,working-with-the-samples-apps.md,add-sampleskill,constitution.md,code-style.md,creating-tests.md,specs/001-global-xaml-namespaces/tasks.md— the manual projitems registration step is removed.PR Checklist ✅
Screenshots Compare Test Runresults.🤖 Generated with Claude Code