Exception in SonarQube.Msbuild.Runner

651 views Asked by At

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?

2

There are 2 answers

0
tobre On BEST ANSWER

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

0
Wangen On

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