title: How to run MsBuild in Jenkins scrippted pipeline correctly?
body: <p>I am using scrippted pipeline in Jenkins and I want to compile a solution using MsBuild.<br>
  Problem is when I run it using bat command: <code>bat ' MsBuild.exe solution.sln /p:Configuration=Debug'</code> (which runs it as a batch file) and when the build <strong>FAILS</strong> the <strong>job doesn't fail.</strong><br>
  It's like it doesn't recognize that the MsBuild failed to compile the solution and continues to the next steps.  </p>
  
  <p>How can I run MsBuild and analize the output so that if the build fails, then the job will fail too?  </p>
  
  <p>Thank you</p>