title: SonarScanner giving 'MsBuild.exe' is not recognized as an internal or external command on TFS 2018
body: <p>I'm adding SonarQube to existing TFS 2018 builds. I was following the directions for downloading Community Edition 7.4 located here <a href="https://docs.sonarqube.org/display/SCAN/Install+the+SonarScanner+for+MSBuild" rel="noreferrer">https://docs.sonarqube.org/display/SCAN/Install+the+SonarScanner+for+MSBuild</a>. </p>
  
  <p>Going through the steps of the Quick Installation Guide <a href="https://docs.sonarqube.org/latest/setup/get-started-2-minutes/" rel="noreferrer">https://docs.sonarqube.org/latest/setup/get-started-2-minutes/</a>
  I get to the part where I’m asked to “Execute the Scanner for MSBuild from your computer” using the below commands:</p>
  
  <ol>
  <li>SonarScanner.MSBuild.exe begin /k:"{key}" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="{key}"</li>
  <li>MsBuild.exe /t:Rebuild</li>
  <li>SonarScanner.MSBuild.exe end /d:sonar.login="{key}"</li>
  </ol>
  
  <p>When I run the first command it succeeds
  C:\sonar-scanner-msbuild-4.4.2.1543-net46> SonarScanner.MSBuild.exe begin /k:"{key}" /d:sonar.host.url="http://localhost:9000" /d:sonar.login="{key}"</p>
  
  <p>SonarScanner for MSBuild 4.4.2
  Using the .NET Framework version of the Scanner for MSBuild
  Default properties file was found at C:\sonar-scanner-msbuild-4.4.2.1543-net46\SonarQube.Analysis.xml
  Loading analysis properties from C:\sonar-scanner-msbuild-4.4.2.1543-net46\SonarQube.Analysis.xml
  Pre-processing started.
  Preparing working directories...
  13:32:09.468  Updating build integration targets...
  13:32:09.5  Fetching analysis configuration settings...
  13:32:10.173  Provisioning analyzer assemblies for cs...
  13:32:10.173  Installing required Roslyn analyzers...
  13:32:10.579  Provisioning analyzer assemblies for vbnet...
  13:32:10.579  Installing required Roslyn analyzers...
  13:32:10.735  Pre-processing succeeded.</p>
  
  <p>However when I run the second command "MsBuild.exe /t:Rebuild" It fails with the following error:</p>
  
  <p>C:\Program Files (x86)>MsBuild.exe /t:Rebuild
  'MsBuild.exe' is not recognized as an internal or external command,
  operable program or batch file.</p>
  
  <p>I confirmed I added/updated environmental variables %PATH%, MsBuild exists, I’m wondering if there’s an additional step not noted in the instructions for .NET 4.5 framework?  Has anyone come across this error for .NET using TFS builds or has any thoughts?</p>