microsoft/aspire · error · DistributedApplicationException

Application orchestrator dependency check returned an error

Error message

Application orchestrator dependency check returned an error: {ex.Message} {stderr}{newline}{stdout}

What it means

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.

Solutions

  1. Inspect the wrapped ex.Message and captured stderr/stdout to find the root cause.
  2. Re-run the AppHost — many launch failures are transient.
  3. Reinstall/repair the dcp binary if the message indicates a crash or bad executable format.
  4. Check for external interference (antivirus quarantine, security policy blocking process launch).
Defensive patterns

Strategy: retry

Try / catch

try
{
    var info = await dcpDependencyCheck.GetDcpInfoAsync(ct);
}
catch (DistributedApplicationException ex)
{
    // transient launch/IO failures are worth one retry; check embedded stderr for root cause
    await Task.Delay(TimeSpan.FromSeconds(2), ct);
    var info = await dcpDependencyCheck.GetDcpInfoAsync(ct);
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


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

Appendix: source

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

                {
                    return null; // Best effort
                }

                var dcpInfo = JsonSerializer.Deserialize<DcpInfo>(output);
                if (dcpInfo == null)
                {
                    return null; // Best effort
                }

                EnsureDcpVersion(dcpInfo);
                _dcpInfo = dcpInfo;
                return dcpInfo;
            }
            catch (Exception ex) when
                (ex is not DistributedApplicationException
                && !(ex is OperationCanceledException && cancellationToken.IsCancellationRequested))
            {
                throw new DistributedApplicationException(string.Format(
                    CultureInfo.InvariantCulture,
                    MessageStrings.DcpDependencyCheckFailedMessage,
                    $"{ex.Message} {errorStringBuilder.ToString()}{Environment.NewLine}{outputStringBuilder.ToString()}"
                ));
            }
            finally
            {
                if (processDisposable != null)
                {
                    try
                    {
                        await processDisposable.DisposeAsync().ConfigureAwait(false);
                    }
                    catch { } // Dispose (dcp info process termination) is best effort.
                }
            }
        }
        finally

View on GitHub (pinned to 25830f84bd)