title: How to force `dotnet` CLI to return non zero exit code?
body: <p>I run <code>dotnet</code> from powershell script, and when I specify some unknown switch powershell does not detect any error. And output goes to stdin whereas I'd expect it to be stderr.</p>
  
  <p>Is it a setting on dotnet or powershell side? I need script to fail in case of errors.</p>
  
  <blockquote>
    <p>dotnet pack -dsfsdf Microsoft (R) Build Engine version
    15.8.166+gd4e8d81a88 for .NET Core Copyright (C) Microsoft Corporation. All rights reserved.</p>
    
    <p>MSBUILD : error MSB1001: Unknown switch. Switch: -dsfsdf</p>
    
    <p>For switch syntax, type "MSBuild /help"</p>
  </blockquote>