title: Can SonarQube Scanner for MSBuild be run from within a powershell script?
body: <p>I'm having trouble getting the MSBuild Sonar Runner working within a powershell script.  Sample script is shown below following the documented procedure of executing all steps from the same directory.</p>
  
  <pre><code>$sonarRunnerPath = "C:\Users\glenn\MSBuild.SonarQube.Runner-2.0\MSBuild.SonarQube.Runner.exe"
  $msbuildPath = "$env:WINDIR\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe"
  
  Push-Location $slnDir
  &amp; $sonarRunnerPath begin /k:proj:alpha "/n:Project Alpha" /v:1.0.0.%BUILD_NUMBER% /d:sonar.host.url=http://sonar.local
  &amp; $msbuildPath /nologo /t:Build /nologo /v:n /clp:ErrorsOnly /m /p:Configuration=Release
  &amp; $sonarRunnerPath end
  </code></pre>
  
  <p>However after building (second step) I notice that the $slnDir/.sonarqube/out directory is empty, then after running the end command I receive the standard error message:</p>
  
  <pre><code>No ProjectInfo.xml files were found. Possible causes:
  </code></pre>
  
  <p>Any ideas as to why running msbuild within powershell prevents msbuild from producing ProjectInfo.xml output files?</p>