Back to Uno

Dev Server Diagnostics (`disco`)

doc/articles/features/devserver-disco.md

6.6-release-branch-cut6.6 KB
Original Source

Dev Server Diagnostics (disco)

<p align="center"> </p>

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.

When to use it

  • The Dev Server does not start or Hot Reload is not working
  • The App MCP fails to connect
  • You want to verify your environment after installing or updating packages
  • You need machine-readable output for CI or AI agents

Prerequisites

The disco command is part of the Dev Server CLI. You can run it in two ways:

.NET 10+

No installation needed — use dotnet dnx to run it directly:

bash
dotnet dnx -y uno.devserver disco

.NET 9

Install the CLI as a global tool, then run it:

bash
dotnet tool install -g uno.devserver
uno-devserver disco

To update an existing installation:

bash
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.

Syntax

bash
uno-devserver disco [--json] [--addins-only]
OptionDescription
(none)Display a human-readable table with colored output
--jsonEmit the full discovery result as a JSON object
--addins-onlyOutput only resolved add-in paths (semicolon-separated, or JSON array with --json)

Reading the output

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.

Uno SDK

KeyWhat it tells you
sdkSourceHow the SDK was found (typically global.json)
sdkSourcePathFull path to the file that declares the SDK
globalJsonPathFull path to the nearest global.json
sdkPackageSDK package id (Uno.Sdk or Uno.Sdk.Private)
sdkVersionSDK version declared in global.json
sdkPathResolved path in the NuGet cache
packagesJsonPathPath to the SDK's packages.json manifest

DevServer

KeyWhat it tells you
devServerPackageVersionUno.WinUI.DevServer version listed in packages.json
devServerPackagePathResolved package path in the NuGet cache
devServerHostPathPath to the host executable (Uno.UI.RemoteControl.Host) the Dev Server will launch

Settings

KeyWhat it tells you
settingsPackageVersionuno.settings.devserver version listed in packages.json
settingsPackagePathResolved package path in the NuGet cache
settingsPathPath to Uno.Settings.dll

.NET

KeyWhat it tells you
dotNetVersionRaw output of dotnet --version
dotNetTfmComputed target framework moniker (e.g. net10.0) used to locate the host

Add-Ins

KeyWhat it tells you
discoveryMethodHow add-ins were discovered (e.g. targets)
discoveryDurationMsTime taken for add-in discovery
(add-in rows)Each resolved add-in shows its package name and DLL path

Warnings and errors

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.

Interpreting <null> values

A <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
globalJsonPathNo global.json found — run disco from your solution directory
sdkPackage / sdkVersionglobal.json exists but does not declare Uno.Sdk (or Uno.Sdk.Private) under msbuild-sdks
sdkPathThe SDK package is not restored — run dotnet restore
packagesJsonPathSDK package is restored but packages.json is missing inside it — the package may be corrupted
devServerPackageVersionUno.WinUI.DevServer is not listed in packages.json
devServerPackagePathThe DevServer package is not in the NuGet cache — run dotnet restore
devServerHostPathThe host executable is not found for the current .NET TFM — your .NET version may not match the package
dotNetVersion / dotNetTfmdotnet --version failed — verify your .NET SDK installation
settingsPackageVersionuno.settings.devserver is not listed in packages.json (non-critical)

Exit code

CodeMeaning
0All checks passed — no errors detected
1One or more errors were reported

JSON mode

Pass --json to get the full discovery result as a JSON object, suitable for scripting, CI pipelines, or consumption by AI agents:

bash
uno-devserver disco --json

The output contains all the same keys as the table, plus the warnings and errors arrays.

Add-ins only mode

Pass --addins-only to output only the resolved add-in DLL paths:

bash
# Semicolon-separated (default)
uno-devserver disco --addins-only

# JSON array
uno-devserver disco --addins-only --json

Common diagnostic scenarios

No global.json found

text
globalJsonPath     <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.

SDK package not restored

text
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.

Host not found for current .NET version

text
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.

DevServer package version missing

text
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.

See also