Repository navigation
fix(devserver): find add-ins via the solution's projects - #25700
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]>
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25700/docs/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 241279 found UI Test snapshots differences: Details
|
|
|
|
C:/Program Files/Git/azp run |
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s). |
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25700/docs/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 241408 found UI Test snapshots differences: Details
|
|
@Mergifyio backport servicing/6.8 |
✅ Backports have been createdDetails
|
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]>
|
🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-25700/docs/index.html |
|
🤖 Your WebAssembly Sample App stage site is ready! Visit it here: |
|
The build 241589 found UI Test snapshots differences: Details
|
|
This pull request does not currently match the merge queue conditions, so it cannot be queued from here. The box comes back if it matches again. |
|
@Mergifyio backport release/stable/6.7 |
✅ Backports have been createdDetails
|
…r-25700 fix(devserver): find add-ins via the solution's projects (backport #25700)
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