Lesstep
Azure Pipelines · .NET · Checked November 6, 2026

Azure Pipelines: "Dotnet command failed with non-zero exit code on the following projects"

The .NET Core task (DotNetCoreCLI@2) runs dotnet once for each project file its pattern matches. When one run exits with a code other than 0, the task logs it, goes on with the next project, and at the end lists every project that failed in this message (the task's source). So the message only says which projects failed. Why they failed is in dotnet's own output above it (questions on Stack Overflow with this message have been seen over 320,000 times).

What it looks like

When the failing step is part of a pull request's build validation, the pull request waits on it: Azure DevOps Pull Requests, a plugin for JetBrains IDEs, lists the pull request's branch policies with their state in Rider, and with Pro runs a failed build policy again once the fix is pushed. Its Pipelines tab (version 1.0.86 and later) lists the runs of the repositories you have open and opens a failed task's log in the editor, free to read.

Find the real error

A project you did not mean to build

The SDK on the agent

The restore inside build, test and publish

Tests that failed

Azure DevOps pull requests in IntelliJ IDEA and Rider

Azure DevOps Pull Requests, a plugin by Lesstep for JetBrains IDEs 2024.1 or later and Android Studio, reads the organization, project and repository from your git remote and lists the pull requests that wait for your review in an IDE tool window, on Azure DevOps Services and on Azure DevOps Server. It shows the branch policies of a pull request with their state, so a required build that has not passed is next to its pull request, and with Pro you run a failed or expired build policy again from there. The review inbox is free; voting, commenting, completing and creating are Pro, with a 30-day trial.

Get it on JetBrains Marketplace

Azure DevOps, Azure Pipelines and .NET are trademarks of Microsoft Corporation; IntelliJ IDEA and Rider are trademarks of JetBrains s.r.o. This page is not affiliated with or endorsed by Microsoft or JetBrains.

More: No test result files matching were found · 409 (Conflict - The feed already contains) · Bash exited with code 1 · NETSDK1045: the .NET SDK does not support the target · MSB3644: the reference assemblies were not found · the dotnet task matched no project · NuGet: Unable to load the service index for source · Unable to locate executable file · 日本語