microsoft/aspire · critical · FileNotFoundException

The Aspire orchestration component is not installed at

Error message

The Aspire orchestration component is not installed at "{dcpPath}". The application cannot be run without it.

What it means

Thrown as FileNotFoundException by GetDcpInfoAsync when the DCP (Developer Control Plane) binary does not exist at the path resolved from the CliPath option. DCP is the local orchestration component Aspire uses to run resources; without the binary the app host cannot launch anything.

Solutions

  1. Reinstall or repair the Aspire workload/CLI so the dcp binary is restored under the expected path.
  2. Check/fix the DcpOptions.CliPath configuration (e.g. ASPIRE_DCP_CLI_PATH env var or builder options) to point at the existing dcp executable.
  3. Verify the file exists at the logged path with ls/Get-Item and correct permissions.
  4. Clear stale DCP state (~/.aspire/dcp* directories) and restart the AppHost.

Example fix

// before: path misconfigured
builder.Configuration["ASPIRE_DCP_CLI_PATH"] = "/wrong/path/dcp";
// after: point to a valid executable (or remove the override entirely)
builder.Configuration["ASPIRE_DCP_CLI_PATH"] = "/home/user/.dotnet/tool-resolve/aspire/dcp/dcp";
Defensive patterns

Strategy: validation

Validate before calling

var dcpPath = dcpOptions.CliPath;
if (string.IsNullOrEmpty(dcpPath) || !File.Exists(dcpPath))
{
    throw new InvalidOperationException($"DCP binary not found at '{dcpPath}'. Reinstall the Aspire CLI or fix the CliPath option before running.");
}

Try / catch

try
{
    var dcpInfo = await dcpDependencyCheck.GetDcpInfoAsync(cancellationToken);
}
catch (FileNotFoundException ex)
{
    logger.LogError(ex, "DCP missing at {Path}; reinstall the Aspire CLI or correct CliPath.", ex.FileName);
}

Prevention

When it happens

Trigger: Aspire.Hosting.Dcp.DcpDependencyCheck.GetDcpInfoAsync checks File.Exists(DcpOptions.CliPath) before invoking 'dcp'; the file is missing at that path.

Common situations: A partial or corrupted Aspire CLI/SDK install, CliPath manually overridden to a wrong location, DCP binaries deleted by antivirus/cleanup tools, or running the AppHost on a machine where the workload components were never restored.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


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

Appendix: source

Thrown at src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs:49

    public async Task<DcpInfo?> GetDcpInfoAsync(bool force = false, CancellationToken cancellationToken = default)
    {
        await _lock.WaitAsync(cancellationToken).ConfigureAwait(false);

        try
        {
            if (_checkDone && !force)
            {
                return _dcpInfo;
            }
            _checkDone = true;

            var dcpPath = _dcpOptions.CliPath;
            var containerRuntime = _dcpOptions.ContainerRuntime;

            if (!File.Exists(dcpPath))
            {
                throw new FileNotFoundException($"The Aspire orchestration component is not installed at \"{dcpPath}\". The application cannot be run without it.", dcpPath);
            }

            IAsyncDisposable? processDisposable = null;
            Task<ProcessResult> task;
            var outputStringBuilder = new StringBuilder();
            var errorStringBuilder = new StringBuilder();

            try
            {
                var arguments = "info";
                if (!string.IsNullOrEmpty(containerRuntime))
                {
                    arguments += $" --container-runtime {containerRuntime}";
                }

                var processSpec = new ProcessSpec(dcpPath)
                {
                    Arguments = arguments,

View on GitHub (pinned to 25830f84bd)