doc/articles/features/devserver-disco.md
disco)The disco command inspects your development environment and reports what it finds — without invoking MSBuild. It is the fastest way to verify that the Dev Server can locate all the components it needs: the Uno SDK, the DevServer host process, add-ins, and the .NET runtime.
The disco command is part of the Dev Server CLI. You can run it in two ways:
No installation needed — use dotnet dnx to run it directly:
dotnet dnx -y uno.devserver disco
Install the CLI as a global tool, then run it:
dotnet tool install -g uno.devserver
uno-devserver disco
To update an existing installation:
dotnet tool update -g uno.devserver
[!IMPORTANT] Keep the CLI up to date. An older version may not report all fields or may not resolve add-ins correctly.
uno-devserver disco [--json] [--addins-only]
| Option | Description |
|---|---|
| (none) | Display a human-readable table with colored output |
--json | Emit the full discovery result as a JSON object |
--addins-only | Output only resolved add-in paths (semicolon-separated, or JSON array with --json) |
The table is grouped into sections. Each row shows a key and a value. When a value could not be resolved, it appears as <null> with a hint about what is missing.
| Key | What it tells you |
|---|---|
sdkSource | How the SDK was found (typically global.json) |
sdkSourcePath | Full path to the file that declares the SDK |
globalJsonPath | Full path to the nearest global.json |
sdkPackage | SDK package id (Uno.Sdk or Uno.Sdk.Private) |
sdkVersion | SDK version declared in global.json |
sdkPath | Resolved path in the NuGet cache |
packagesJsonPath | Path to the SDK's packages.json manifest |
| Key | What it tells you |
|---|---|
devServerPackageVersion | Uno.WinUI.DevServer version listed in packages.json |
devServerPackagePath | Resolved package path in the NuGet cache |
devServerHostPath | Path to the host executable (Uno.UI.RemoteControl.Host) the Dev Server will launch |
| Key | What it tells you |
|---|---|
settingsPackageVersion | uno.settings.devserver version listed in packages.json |
settingsPackagePath | Resolved package path in the NuGet cache |
settingsPath | Path to Uno.Settings.dll |
| Key | What it tells you |
|---|---|
dotNetVersion | Raw output of dotnet --version |
dotNetTfm | Computed target framework moniker (e.g. net10.0) used to locate the host |
| Key | What it tells you |
|---|---|
discoveryMethod | How add-ins were discovered (e.g. targets) |
discoveryDurationMs | Time taken for add-in discovery |
| (add-in rows) | Each resolved add-in shows its package name and DLL path |
Warnings (yellow) indicate non-critical issues — for example, the Settings package is not present. Errors (red) indicate problems that will prevent the Dev Server from starting.
<null> valuesA <null> value means the component could not be resolved. Use the hint next to it to understand what is missing.
Key shows <null> | What to check |
|---|---|
globalJsonPath | No global.json found — run disco from your solution directory |
sdkPackage / sdkVersion | global.json exists but does not declare Uno.Sdk (or Uno.Sdk.Private) under msbuild-sdks |
sdkPath | The SDK package is not restored — run dotnet restore |
packagesJsonPath | SDK package is restored but packages.json is missing inside it — the package may be corrupted |
devServerPackageVersion | Uno.WinUI.DevServer is not listed in packages.json |
devServerPackagePath | The DevServer package is not in the NuGet cache — run dotnet restore |
devServerHostPath | The host executable is not found for the current .NET TFM — your .NET version may not match the package |
dotNetVersion / dotNetTfm | dotnet --version failed — verify your .NET SDK installation |
settingsPackageVersion | uno.settings.devserver is not listed in packages.json (non-critical) |
| Code | Meaning |
|---|---|
0 | All checks passed — no errors detected |
1 | One or more errors were reported |
Pass --json to get the full discovery result as a JSON object, suitable for scripting, CI pipelines, or consumption by AI agents:
uno-devserver disco --json
The output contains all the same keys as the table, plus the warnings and errors arrays.
Pass --addins-only to output only the resolved add-in DLL paths:
# Semicolon-separated (default)
uno-devserver disco --addins-only
# JSON array
uno-devserver disco --addins-only --json
global.json foundglobalJsonPath <null> (missing global.json in working directory or parents)
You are running disco outside of an Uno Platform project directory. Change to the directory containing your .sln or .slnx file.
sdkPath <null> (missing restored Uno.Sdk package in NuGet cache)
The Uno SDK version declared in global.json has not been restored yet. Run dotnet restore and try again.
devServerHostPath <null> (missing Uno.WinUI.DevServer host for current dotnet TFM)
dotNetTfm net11.0
The DevServer package does not contain a host for the .NET version you are running. Verify that the dotNetTfm shown matches the .NET version supported by your Uno SDK version.
devServerPackageVersion <null> (missing Uno.WinUI.DevServer entry in packages.json)
The SDK's packages.json does not reference Uno.WinUI.DevServer. This may indicate a corrupted or incomplete SDK package.