Skip to content
Latchkey

Azure Pipelines "The process '...' failed with exit code"

A task ran an external program (dotnet, git, npm, msbuild) and that program exited non-zero. The task only reports the exit code; the real failure is in the tool output printed above this line.

What this error means

A step fails with ##[error]The process '/usr/bin/dotnet' failed with exit code 1 (or another tool and code), after the tool printed its own error.

Azure DevOps
error CS0246: The type or namespace name 'Foo' could not be found
##[error]The process '/usr/bin/dotnet' failed with exit code 1

Common causes

The wrapped tool genuinely failed

A compile error, a failed test, or a bad argument made the underlying program exit non-zero, and the task faithfully propagated that code.

A wrong argument or missing input to the tool

The task passed an option the tool rejected, so it exited before doing real work.

How to fix it

Read the tool output above the error

  1. Scroll up to the first error the wrapped tool printed.
  2. Fix that underlying failure (the compile error, test, or argument).
  3. Re-run; the exit-code line clears once the tool succeeds.

Reproduce the exact command locally

Copy the command the task logged and run it on a matching environment to debug the tool failure outside CI.

Terminal
dotnet build src/App/App.csproj -c Release

How to prevent it

  • Treat the exit-code line as a pointer, not the root cause.
  • Keep tool output verbose enough to show the real error.
  • Reproduce the logged command locally when CI-only failures appear.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →