When there are no errors in a build, but only warnings that have been promoted to error with WarnAsError then the build will not fail with an exit of 1.
$ dotnet build --no-incremental /WarnAsError
...
Build FAILED.
....cs(28,1): error SA1507: Code must not contain multiple blank lines in a row [....csproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:01.55
Exit code => 0
Given that there are errors in the build, would expect an exit code of 1
Note that if there are genuine errors in the build, the build will fail correctly with the correct exit code
OS: Linux Ubuntu 18.04
dotnet version: 2.2.3-preview
When there are no errors in a build, but only warnings that have been promoted to error with WarnAsError then the build will not fail with an exit of 1.
Given that there are errors in the build, would expect an exit code of 1
Note that if there are genuine errors in the build, the build will fail correctly with the correct exit code
OS: Linux Ubuntu 18.04
dotnet version: 2.2.3-preview