Make dotnet build write warnings to stdout not stderr
Steps to reproduce
When dotnet build is executed and compiler warnings are found these are written to stderr. I think these should be written to stdout.
Expected behavior
Compiler warnings should be in stdout
Actual behavior
Compiler warnings appear in stderr
Environment data
dotnet --info output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: Mac OS X
OS Version: 10.11
OS Platform: Darwin
RID: osx.10.11-x64
One thing to consider is if "Treat warnings as errors" is on then it should go to stderr else default should be stdout
I also encountered this when I found that "dotnet build" warnings in a TeamCity log show up in red.
I just tried this with preview3. Warnings are being redirected to std out.
Warnings in stderr for 1.0.0-preview2-1-003177 (latest version), and it stopes TeamCity to continue.
$stdErrLog = "D:\stderr.log"
$stdOutLog = "D:\stdout.log"
cd D:\WebApp
Start-Process -File "D:\WebApp\build.bat" -RedirectStandardOutput $stdOutLog -RedirectStandardError $stdErrLog -wait
build.bat is dotnet build