Skip to content

fix(devserver): find add-ins via the solution's projects (backport #25700) (backport #25742) - #25973

Merged
agneszitte merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25742
Nov 3, 2026
Merged

agneszitte merged 2 commits into
release/stable/6.7from
mergify/bp/release/stable/6.7/pr-25742

Conversation

@mergify

@mergify mergify Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #24311

Part of #25524, the ZiiDMS report. #25613 makes the selected solution authoritative and lists add-in discovery from that solution as out of scope; this PR is that piece.

PR Type:

🐞 Bugfix

What changed? 🚀

Add-in discovery read project.assets.json from just two places: the workspace root's own obj folder, and the obj folder of each immediate subdirectory. The workspace root is the folder of the nearest global.json. An app under src/MyApp/ is two levels down, which is a very common layout, so its restored package versions were never read. TargetsAddInResolver then resolved add-ins from the Uno SDK's packages.json defaults alone:

UnoToolsLocator now passes the selected solution to ProjectAssetsParser.FindProjectAssetsFilesAsync. That method reads the solution with Microsoft.VisualStudio.SolutionPersistence, the same way CsprojUserGenerator already does. It returns the obj/project.assets.json of each listed project that has been restored, at any depth, in solution order. Assets that two projects in one folder share are read once. The old folder scan remains the fallback when there is no selected solution, it cannot be read, or none of its projects is restored yet. Only the selected solution's assets are read, so a library solution elsewhere in the workspace no longer feeds its versions in. That is the layout behind #25524.

Docs: src/Uno.UI.DevServer.Cli/addin-discovery.md and specs/001-fast-devserver-startup/spec-appendix-b-addin-discovery.md.

Validation

PR Checklist ✅

  • 🧪 Added unit tests (Given_ProjectAssetsParser); runtime check with disco --json above
  • 📚 Docs have been updated (addin-discovery.md, spec appendix B)
  • 🖼️ Validated PR Screenshots Compare Test Run results. (n/a: DevServer CLI only)
  • ❗ Contains NO breaking changes
  • 👀 Reviewed 2 other open pull requests

🤖 Generated with Claude Code


This is an automatic backport of pull request #25700 done by [Mergify](https://mergify.com).
This is an automatic backport of pull request #25742 done by [Mergify](https://mergify.com).

vatsashah45 and others added 2 commits November 3, 2026 08:13
Add-in discovery read project.assets.json only from the workspace root and
its immediate subdirectories. An app under src/MyApp/ is two levels down,
so its restored versions were never read: add-ins resolved from the Uno
SDK's packages.json defaults, and an add-in the SDK does not list, such as
Uno.UI.App.Mcp on some SDKs, was left out of --addins entirely.

Discovery now reads the obj/project.assets.json of each project the
selected solution lists, at any depth. The folder scan remains the
fallback when there is no readable, restored solution.

Fixes #24311. Part of #25524.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 5f89f3c)
(cherry picked from commit b7c99ec)
Resolve project paths against the solution folder with
Path.GetFullPath(path, base) and join fixed segments with Path.Join.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit cf75c96)
(cherry picked from commit 1488a75)
@agneszitte
agneszitte merged commit 7ad6763 into release/stable/6.7 Nov 3, 2026
13 of 18 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.7/pr-25742 branch November 3, 2026 08:26
@unodevops

Copy link
Copy Markdown
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants