Repository navigation
fix(devserver): find add-ins via the solution's projects (backport #25700) - #25742
Merged
Merged
Conversation
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)
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)
3 of 5 tasks
Contributor
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
Contributor
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25742/docs/index.html |
Contributor
|
|
agneszitte
approved these changes
Nov 3, 2026
Member
|
@Mergifyio backport release/stable/6.7 |
Contributor
Author
✅ Backports have been createdDetails
|
Merged
3 of 5 tasks
This was referenced Nov 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonfrom just two places: the workspace root's ownobjfolder, and theobjfolder of each immediate subdirectory. The workspace root is the folder of the nearestglobal.json. An app undersrc/MyApp/is two levels down, which is a very common layout, so its restored package versions were never read.TargetsAddInResolverthen resolved add-ins from the Uno SDK'spackages.jsondefaults alone:packages.jsondoes not list, such asUno.UI.App.Mcpon the SDK reported in DevServer add-in discovery misses project.assets.json when projects sit more than one level below the workspace root #24311, was left out of--addinsentirely, so the host exposed no MCP tools.UnoToolsLocatornow passes the selected solution toProjectAssetsParser.FindProjectAssetsFilesAsync. That method reads the solution withMicrosoft.VisualStudio.SolutionPersistence, the same wayCsprojUserGeneratoralready does. It returns theobj/project.assets.jsonof 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.mdandspecs/001-fast-devserver-startup/spec-appendix-b-addin-discovery.md.Validation
masterand from this branch, then randisco --jsonin a fixture shaped like DevServer add-in discovery misses project.assets.json when projects sit more than one level below the workspace root #24311:global.jsonat the root,src/App.slnx, and a real restored Uno app'sobj/project.assets.jsonatsrc/UnoSherpa.App/obj/. The SDK was Uno.Sdk 6.5.31, and the restoredUno.UI.App.Mcpwas 1.3.7.master:uno.ui.app.mcp\1.1.4\tools\devserver\Uno.UI.App.Mcp.Server.dll, the SDK default; the project's assets were never read.uno.ui.app.mcp\1.3.7\tools\devserver\Uno.UI.App.Mcp.Server.dll, the restored version.Given_ProjectAssetsParseris new inUno.UI.DevServer.Cli.Testsand covers 9 cases: the DevServer add-in discovery misses project.assets.json when projects sit more than one level below the workspace root #24311 layout, the DevServer MCP launches another solution than the one selected (monitor rescan, candidate check, workspace watcher) #25524 layout,.slnwith backslash and sibling-folder paths, unrestored projects, a missing or unreadable solution, and a sharedobjfolder. I put them there instead of next toProjectAssetsParserTestsbecauseUno.UI.RemoteControl.DevServer.Testsbuilds most of the repo. Results: 447 of 449 tests pass on .NET 11 RC2. The 2 failures,Given_McpRootsFallbackProcess.*_DeferredDevServerStarts, also fail on unmodifiedmasterin my checkout. They need theSolutionTemplateworkspace, which my sparse checkout leaves out.Uno.UI.DevServer.Clibuilds in Release with no warnings. I did not buildUno.UI.RemoteControl.DevServer.Tests, which also linksProjectAssetsParser.cs. It already referencesMicrosoft.VisualStudio.SolutionPersistenceand compilesCsprojUserGenerator.cs, which uses the same API.PR Checklist ✅
Given_ProjectAssetsParser); runtime check withdisco --jsonaboveaddin-discovery.md, spec appendix B)Screenshots Compare Test Runresults. (n/a: DevServer CLI only)🤖 Generated with Claude Code
This is an automatic backport of pull request #25700 done by [Mergify](https://mergify.com).