This changes ErrorActionPreference before shell invoking a new process so that error is determined by exit code and not by output to stderr alone. This is a quirk of PowerShell. When $ErrorActionPreference='Stop', any output to stderr is a fatal error and kills the process immediately.
This changes ErrorActionPreference before shell invoking a new process so that error is determined by exit code and not by output to stderr alone. This is a quirk of PowerShell. When
$ErrorActionPreference='Stop'
, any output to stderr is a fatal error and kills the process immediately.Example: https://ci.appveyor.com/project/aspnetci/kestrelhttpserver/build/1.0.5373 got shortcircuited. but https://ci.appveyor.com/project/aspnetci/kestrelhttpserver/build/1.0.5375 (run with this fix) allowed dotnet-test to complete.