Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotnet command failed with non-zero exit code on the following projects

I have set up a build definition on VSTS. It builds fine on my local machine. But I get the following error when I start the build process

[error]Dotnet command failed with non-zero exit code on the following projects : D:\a\1\s\My.Project\My.Project.csproj

like image 897
Kevin Brydon Avatar asked Mar 09 '18 21:03

Kevin Brydon


1 Answers

Check the project name in the error carefully. Chances are its not actually in your solution .sln ... and wouldn't build if it were. By default, VSTS will try to build all .csproj files regardless whether they are in your solution or not. Remove all .csproj files for projects you don't want to be built.

In my case. I deleted the \My.Project directory (which contained the .csproj file) and the build suceeded.

like image 161
Kevin Brydon Avatar answered Oct 16 '22 20:10

Kevin Brydon