microsoft/aspire · critical · DistributedApplicationException

Dashboard path empty or file does not exist.

Error message

Dashboard path empty or file does not exist.

What it means

AddDashboardResource creates the dashboard executable resource from the configured DashboardPath. If the option is null/empty or doesn't point to an existing file (the message covers both cases as configured here), DistributedApplicationException is thrown because the app host cannot start the dashboard without it. This typically happens when the Aspire SDK-provided dashboard artifacts are missing.

Solutions

  1. Build via the Aspire SDK (dotnet build the AppHost) so DashboardPath is populated automatically; don't run the AppHost DLL directly with a plain dotnet SDK lacking Aspire targets
  2. Set Aspire:Hosting:DashboardPath explicitly to an existing dashboard executable path
  3. Verify the file exists at the configured path; reinstall/restore the Aspire SDK/dashboard artifacts if missing

Example fix

// before
// no DashboardPath configured
// after (appsettings or code)
builder.Configuration["Aspire:Hosting:Dashboard:DashboardPath"] = Path.Combine(AppContext.BaseDirectory, "dashboard", "AspireDashboard.exe");
Defensive patterns

Strategy: validation

Validate before calling

var path = builder.Configuration["Aspire:Hosting:Dashboard:DashboardPath"];
if (string.IsNullOrEmpty(path) || !File.Exists(path))
    throw new FileNotFoundException("Dashboard executable not found or DashboardPath not set.", path);

Try / catch

try { builder.Build().Run(); }
catch (DistributedApplicationException ex) when (ex.Message.Contains("Dashboard path")) { /* fix Aspire SDK targets or set DashboardPath */ }

Prevention

When it happens

Trigger: DashboardOptions.DashboardPath is not set (null); the configured dashboard executable file does not exist at the given path; using Aspire.Hosting without the SDK build target that normally locates the dashboard binary.

Common situations: Running the AppHost from an IDE or environment where the Aspire SDK targets didn't set DashboardPath; manually installed/updated SDK versions where the dashboard artifacts folder changed; moving the AppHost output so the relative dashboard path no longer resolves.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of microsoft/aspire@25830f84bd (2026-09-16). Data as JSON: /api/errors/6dea17dd69bf94f4. Report an issue: GitHub.

Appendix: source

Thrown at src/Aspire.Hosting/Dashboard/DashboardEventHandlers.cs:281

                            break;
                    }
                }
            }
        }

        // Create a temporary file for the custom runtime config
        var tempPath = directoryService.TempDirectory.CreateTempFile("runtimeconfig.json").Path;
        File.WriteAllText(tempPath, configJson.ToJsonString(new JsonSerializerOptions { WriteIndented = true }));

        _customRuntimeConfigPath = tempPath;
        return tempPath;
    }

    private void AddDashboardResource(DistributedApplicationModel model)
    {
        if (dashboardOptions.Value.DashboardPath is not { } dashboardPath)
        {
            throw new DistributedApplicationException("Dashboard path empty or file does not exist.");
        }

        var fullyQualifiedDashboardPath = Path.GetFullPath(dashboardPath);
        var dashboardWorkingDirectory = Path.GetDirectoryName(fullyQualifiedDashboardPath);

        ExecutableResource dashboardResource;

        if (BundleDiscovery.IsAspireManagedBinary(fullyQualifiedDashboardPath))
        {
            // aspire-managed is self-contained, run directly with "dashboard" subcommand
            dashboardResource = new ExecutableResource(KnownResourceNames.AspireDashboard, fullyQualifiedDashboardPath, dashboardWorkingDirectory ?? "");

            dashboardResource.Annotations.Add(new CommandLineArgsCallbackAnnotation(args =>
            {
                args.Insert(0, "dashboard");
            }));
        }
        else

View on GitHub (pinned to 25830f84bd)