You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DevServer workspace resolution becomes Ambiguous in mono-repo with submodules (multiple global.json roots) #139
in repositories that contain nested git submodules with their own global.json + solution files.
This is common in mono-repos where submodules are intentionally buildable on their own.
Expected behavior
When started from repo root (or from IDE workspace root), DevServer should prefer the solution for that root workspace and not compete with nested submodule workspaces.
At minimum, resolver should provide deterministic preference order, e.g.:
solution under requested working directory root
direct root candidate before nested submodule candidates
Also acceptable: explicit config to pin preferred solution (for example uno.devserver.json).
Resolver scores solution candidates by nearest global.json distance.
In submodule layouts, root solution and nested submodule solutions can all get equal best score (or otherwise tie), so resolver cannot choose and returns Ambiguous.
Real-world impact
DevServer startup fails in valid mono-repo/submodule setups unless users apply destructive local hacks (e.g. deleting nested global.json). WebAssembly target cannot be selected and run correctly.
Requested fix
Please make workspace resolution submodule-aware and root-aware:
prioritize requested workspace root solution over nested submodule solutions
keep nested submodules as independent workspaces only when explicitly targeted
optionally add config-based pinning of preferred solution path
Environment
Uno CLI: 6.6.176
Uno.Sdk: 6.6.33
IDE: Visual Studio Enterprise 2026 (18.9.0-insiders)
changed the title [-]DevServer workspace resolution returns Ambiguous when repo contains multiple .slnx files at same GlobalJsonDistance[/-][+]DevServer workspace resolution becomes Ambiguous in mono-repo with submodules (multiple `global.json` roots)[/+]on Jul 28, 2026
Proposed fix: deterministic tie-break for workspace resolution
Root cause
The resolver scores candidates purely by distance to the nearest global.json. In a mono-repo with submodules, a root solution and a nested submodule solution can land on equal scores, so the resolver has no way to break the tie and returns Ambiguous.
Suggested resolution order
Explicit override (checked first, short-circuits everything else)
If uno.devserver.json exists with a solutionPath, use it directly and skip scoring entirely.
{
"solutionPath": "./MySolution.slnx"
}
Distance to global.json (existing behavior, unchanged)
Tie-break 1 – repo root vs. submodule
Read .gitmodules at the resolved repo root (or run git submodule status) to get the set of known submodule paths. Any candidate located inside a submodule path is deprioritized relative to a candidate at the root. This directly resolves the reported repro (root + SubmoduleA/B/C).
Tie-break 2 – naming convention
If still tied (e.g., multiple non-submodule siblings), prefer a solution file whose name matches its containing directory (MySolution.slnx inside MySolution/).
Tie-break 3 – deterministic fallback
If still tied, pick alphabetically by relative path instead of throwing Ambiguous. A stable, reproducible choice is strictly better than a hard failure – it can always be overridden via step 1.
Why this fixes the reported case
The repro tree has one root global.json + three submodules each with their own global.json/.sln. Today they tie on distance. Detecting submodule membership via .gitmodules is cheap (no extra I/O beyond a file read already needed for git operations) and gives a correct, non-destructive signal – no need to delete nested global.json files as a workaround.
Compatibility
Non-submodule mono-repos are unaffected (tie-break 1 only fires when submodules exist).
uno.devserver.json is purely additive and opt-in.
Removes a hard failure mode (Ambiguous / selectedSolutionPath: null) in favor of a deterministic pick, with an explicit override always available for edge cases.
Activity
[-]DevServer workspace resolution returns Ambiguous when repo contains multiple .slnx files at same GlobalJsonDistance[/-][+]DevServer workspace resolution becomes Ambiguous in mono-repo with submodules (multiple `global.json` roots)[/+]xperiandri commentedon Jul 28, 2026
@agneszitte could you classify the issue and route to the right person?
xperiandri commentedon Sep 23, 2026
Proposed fix: deterministic tie-break for workspace resolution
Root cause
The resolver scores candidates purely by distance to the nearest
global.json. In a mono-repo with submodules, a root solution and a nested submodule solution can land on equal scores, so the resolver has no way to break the tie and returnsAmbiguous.Suggested resolution order
Explicit override (checked first, short-circuits everything else)
If
uno.devserver.jsonexists with asolutionPath, use it directly and skip scoring entirely.{ "solutionPath": "./MySolution.slnx" }Distance to
global.json(existing behavior, unchanged)Tie-break 1 – repo root vs. submodule
Read
.gitmodulesat the resolved repo root (or rungit submodule status) to get the set of known submodule paths. Any candidate located inside a submodule path is deprioritized relative to a candidate at the root. This directly resolves the reported repro (root +SubmoduleA/B/C).Tie-break 2 – naming convention
If still tied (e.g., multiple non-submodule siblings), prefer a solution file whose name matches its containing directory (
MySolution.slnxinsideMySolution/).Tie-break 3 – deterministic fallback
If still tied, pick alphabetically by relative path instead of throwing
Ambiguous. A stable, reproducible choice is strictly better than a hard failure – it can always be overridden via step 1.Why this fixes the reported case
The repro tree has one root
global.json+ three submodules each with their ownglobal.json/.sln. Today they tie on distance. Detecting submodule membership via.gitmodulesis cheap (no extra I/O beyond a file read already needed for git operations) and gives a correct, non-destructive signal – no need to delete nestedglobal.jsonfiles as a workaround.Compatibility
uno.devserver.jsonis purely additive and opt-in.Ambiguous/selectedSolutionPath: null) in favor of a deterministic pick, with an explicit override always available for edge cases.