{"record":{"id":"727a1b35f3093e83","repo":"microsoft/aspire","slug":"the-developer-control-plane-is-not-installed-at-dcpexepath","errorCode":null,"errorMessage":"The Developer Control Plane is not installed at \"{dcpExePath}\". The application cannot be run without it.","messagePattern":"The Developer Control Plane is not installed at \"(.+?)\"\\. The application cannot be run without it\\.","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"critical","filePath":"src/Aspire.Hosting/Dcp/DcpHost.cs","lineNumber":300,"sourceCode":"                dcpProcessSpec.EnvironmentVariables.Add(\"DCP_LOG_FILE_NAME_SUFFIX\", _dcpOptions.LogFileNameSuffix);\n            }\n\n            _logProcessorTask = Task.Run(() => StartLoggingSocketAsync(loggingSocket));\n        }\n        catch (Exception ex)\n        {\n            _logger.LogError(ex, \"Failed to enable orchestration logging.\");\n        }\n\n        _ = ProcessUtil.Run(dcpProcessSpec);\n    }\n\n    public ProcessSpec CreateDcpProcessSpec(Locations locations)\n    {\n        var dcpExePath = _dcpOptions.CliPath;\n        if (!File.Exists(dcpExePath))\n        {\n            throw new FileNotFoundException($\"The Developer Control Plane is not installed at \\\"{dcpExePath}\\\". The application cannot be run without it.\", dcpExePath);\n        }\n\n        var arguments = $\"start-apiserver --monitor {Environment.ProcessId} --detach --kubeconfig \\\"{locations.DcpKubeconfigPath}\\\"\";\n        if (!string.IsNullOrEmpty(_dcpOptions.ContainerRuntime))\n        {\n            arguments += $\" --container-runtime \\\"{_dcpOptions.ContainerRuntime}\\\"\";\n        }\n\n        if (!string.IsNullOrWhiteSpace(_dcpTlsCertThumbprint))\n        {\n            arguments += $\" --tls-cert-thumbprint \\\"{_dcpTlsCertThumbprint}\\\"\";\n        }\n\n        if (!string.IsNullOrWhiteSpace(_dcpTlsCertFile) && !string.IsNullOrWhiteSpace(_dcpTlsKeyFile))\n        {\n            arguments += $\" --tls-cert-file \\\"{_dcpTlsCertFile}\\\" --tls-key-file \\\"{_dcpTlsKeyFile}\\\"\";\n        }\n","sourceCodeStart":282,"sourceCodeEnd":318,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Dcp/DcpHost.cs#L282-L318","documentation":"DcpHost.CreateDcpProcessSpec verifies that the DCP CLI executable exists at the configured path before building the process spec to start the Developer Control Plane API server. If the file is missing it throws FileNotFoundException — the app cannot run because DCP orchestrates containers/executables. The message includes the checked path and the path is passed as the FileNotFoundException's fileName.","triggerScenarios":"Launching the AppHost when DcpOptions.CliPath points to a nonexistent dcp binary — DCP never installed, install failed or was partially deleted, ASPIRE_DCP_CLI_PATH/ASPIRE_DCP_LOCATION env vars pointing at wrong locations, or version skew after an Aspire upgrade left stale paths.","commonSituations":"CI machines without the DCP download step; ~/.aspine/bin cache cleaned or corrupted; manually setting DCP env overrides incorrectly; running the AppHost on a platform/arch where the DCP binary was not restored; antivirus quarantining the binary.","solutions":["Clear the DCP cache (delete ~/.aspine/bin or the dcp folder under the user profile) and rerun the AppHost so a matching DCP is downloaded.","Check ASPIRE_DCP_CLI_PATH / ASPIRE_DCP_LOCATION environment variables and remove or correct them if they point at a missing binary.","Verify the file actually exists at the path in the message (ls the path) and reinstall if absent.","Ensure the Aspire.Hosting package restored fully (dotnet restore) so its DCP acquisition step can run."],"exampleFix":"// before: stale env override\nexport ASPIRE_DCP_CLI_PATH=/opt/old-dcp/dcp\n// after: unset overrides and let Aspire resolve DCP\nunset ASPIRE_DCP_CLI_PATH\nunset ASPIRE_DCP_LOCATION\ndotnet run --project AppHost","handlingStrategy":"validation","validationCode":"var dcpPath = DcpHost.GetDcpCliPath(); // or your resolved DcpOptions.CliPath\nif (string.IsNullOrEmpty(dcpPath) || !File.Exists(dcpPath))\n{\n    throw new InvalidOperationException($\"DCP CLI missing at '{dcpPath}'. Clear the Aspire cache and rerun.\");\n}","typeGuard":"static bool IsDcpInstalled(string? cliPath) =>\n    !string.IsNullOrWhiteSpace(cliPath) && File.Exists(cliPath);","tryCatchPattern":"try { await app.RunAsync(); }\ncatch (FileNotFoundException ex) when (ex.Message.Contains(\"Developer Control Plane is not installed\"))\n{\n    // trigger DCP re-download or correct ASPIRE_DCP_CLI_PATH, then retry\n}","preventionTips":["Do not set ASPIRE_DCP_CLI_PATH/ASPIRE_DCP_LOCATION unless necessary","Re-restore packages and clear ~/.aspine/bin after upgrades","Verify DCP presence in CI before running AppHosts","Check antivirus quarantine if the path keeps disappearing"],"tags":["dcp","install","file-not-found","environment"],"backgroundTag":"file-not-found","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T09:17:21.228Z"}