title: What is MSBUILD : Unknown switch error solution?
body: <p>I am trying to run a script via powershell.
  But when I try to compile the "build.ps1" script via powershell, I get the following error:</p>
  
  <pre><code>MSBUILD : error MSB1001: Unknown switch.
  Switch: /warnaserror
  
  For switch syntax, type "MSBuild /help"
  An error occurred when executing task 'Build-API'.
  Error: One or more errors occurred.
  MSBuild: Process returned an error (exit code 1).
  </code></pre>
  
  <p>(MSBuild version is : 14.0)</p>
  
  <p><strong>Here is the github repository link of build.ps1 file :</strong> <a href="https://github.com/rticommunity/rticonnextdds-connector-cs/blob/master/build.ps1" rel="nofollow noreferrer">build.ps1</a></p>
  
  <p>How can I fix this error? </p>