0

Running the SonarQube.MsBuild.Runner.exe I get the following exception:

Using environment variables to determine the download directory...
Creating the analysis bin directory:

Unhandled Exception: System.ArgumentException: Path cannot be the empty string or all whitespace.
   at System.IO.Directory.CreateDirectory(String path)
   at SonarQube.Bootstrapper.Program.preprocess(ILogger logger, IBootstrapperSettings settings, String[] args)
   at SonarQube.Bootstrapper.Program.Main(String[] args)

I have the environment variables SONAR_RUNNER_HOME and SONAR_RUNNER_OPTS set like this:

Name                           Value
----                           -----
SONAR_RUNNER_HOME              C:\Program Files\SonarQube\sonar-runner-2.4
SONAR_RUNNER_OPTS              -Xmx512m -XX:MaxPermSize=128m

What is missing?

Pascal Berger
  • 4,262
  • 2
  • 30
  • 54
tobre
  • 1,347
  • 3
  • 21
  • 53
  • Are you calling SonarQube.MSBuild.Runner.exe from within TFS 2013? Version 0.9 does not yet support to be called in a standalone way (and will crash). – Dinesh Bolkensteyn Jun 10 '15 at 14:45
  • I have a prebuild powershell script that is called from TFS 2013 that will call SonarQube.MSBuild.Runner.exe. It fails when it is called from the TFS 2013 build or from the Powershell command line. – tobre Jun 10 '15 at 17:01
  • Does the analysis succeed if you call the SonarQube.MSBuild.Runner.exe directly from the TFS build definition i.e. not via the powershell script? – duncanp Jun 23 '15 at 07:17
  • No, it does not succeed either, There is no error message, not even entries in the sonar.log are produced. I would not be able to do it this way anyway, because I need to do more than just execute sonar. – tobre Jun 24 '15 at 11:29
  • Have a look at the troubleshooting notes in this post: Http://stackoverflow.com/questions/30843177/sonar-and-tfs-2013-no-projectinfo-xml-files-were-found/30894558#30894558. – duncanp Jun 26 '15 at 20:48

2 Answers2

0

Could it be due to the space in C:\Program Files\SonarQube\sonar-runner-2.4 ? Try to add quotation mark around the path or move the location of SonarQube runner to C:\SonarQube\sonar-runner-2.4

Also verify that you are not running Java 8, because then you should remove the SONAR_RUNNER_OPTS variable as described on page 20 here https://vsarguidance.codeplex.com/downloads/get/1452516

Wangen
  • 13
  • 2
0

I am using Sonar.MsBuild.Runner 1.0 now. The problem does not exist in MsBuild Runner.

tobre
  • 1,347
  • 3
  • 21
  • 53