{"record":{"id":"521b7c4967ad6963","repo":"microsoft/aspire","slug":"application-orchestrator-dependency-check-returned-an-error-521b7c","errorCode":null,"errorMessage":"Application orchestrator dependency check returned an error: {ex.Message} {stderr}{newline}{stdout}","messagePattern":"Application orchestrator dependency check returned an error: (.+?) (.+?)(.+?)(.+?)","errorType":"exception","errorClass":"DistributedApplicationException","httpStatus":null,"severity":"error","filePath":"src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs","lineNumber":116,"sourceCode":"                {\n                    return null; // Best effort\n                }\n\n                var dcpInfo = JsonSerializer.Deserialize<DcpInfo>(output);\n                if (dcpInfo == null)\n                {\n                    return null; // Best effort\n                }\n\n                EnsureDcpVersion(dcpInfo);\n                _dcpInfo = dcpInfo;\n                return dcpInfo;\n            }\n            catch (Exception ex) when\n                (ex is not DistributedApplicationException\n                && !(ex is OperationCanceledException && cancellationToken.IsCancellationRequested))\n            {\n                throw new DistributedApplicationException(string.Format(\n                    CultureInfo.InvariantCulture,\n                    MessageStrings.DcpDependencyCheckFailedMessage,\n                    $\"{ex.Message} {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}\"\n                ));\n            }\n            finally\n            {\n                if (processDisposable != null)\n                {\n                    try\n                    {\n                        await processDisposable.DisposeAsync().ConfigureAwait(false);\n                    }\n                    catch { } // Dispose (dcp info process termination) is best effort.\n                }\n            }\n        }\n        finally","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/microsoft/aspire/blob/25830f84bd145686607ad00c057b3f84e2e51d43/src/Aspire.Hosting/Dcp/DcpDependencyCheck.cs#L98-L134","documentation":"Any unexpected exception thrown while launching or reading output from the dcp dependency check is caught and rethrown as a DistributedApplicationException containing the exception message plus dcp's stderr/stdout. It preserves process output for diagnosis while normalizing the failure type.","triggerScenarios":"Inside GetDcpInfoAsync's catch filter: any exception other than DistributedApplicationException, and OperationCanceledException only when the caller did not request cancellation (e.g. dcp process failed to start, streams faulted, timeout via WaitAsync).","commonSituations":"dcp binary killed by antivirus or signal, pipe/stream errors while capturing output, transient OS-level process launch failures, or a hung dcp invocation cancelled by an internal timeout.","solutions":["Inspect the wrapped ex.Message and captured stderr/stdout to find the root cause.","Re-run the AppHost — many launch failures are transient.","Reinstall/repair the dcp binary if the message indicates a crash or bad executable format.","Check for external interference (antivirus quarantine, security policy blocking process launch)."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try\n{\n    var info = await dcpDependencyCheck.GetDcpInfoAsync(ct);\n}\ncatch (DistributedApplicationException ex)\n{\n    // transient launch/IO failures are worth one retry; check embedded stderr for root cause\n    await Task.Delay(TimeSpan.FromSeconds(2), ct);\n    var info = await dcpDependencyCheck.GetDcpInfoAsync(ct);\n}","preventionTips":["Exclude the Aspire/dcp directories from antivirus real-time scanning.","Run AppHosts in environments that permit spawning child processes.","Keep the machine's process limits (ulimit, job objects) within normal bounds.","Treat one retry before surfacing the failure to the user."],"tags":["dcp","process-launch","orchestration"],"backgroundTag":"process-launch-failed","analyzedSha":"25830f84bd145686607ad00c057b3f84e2e51d43","analyzedAt":"2026-09-16T11:10:06.193Z","contentChangedAt":"2026-09-16T11:10:06.193Z","schemaVersion":2},"datasetVersion":"2026-09-21T04:17:39.646Z"}