2
SonarQube - V 5.1.1
MSBuild SonarQube Runner - V 1.0
Resharper Plugin - V 2.0
Csharp Plugin - V 4.1

I am running the commands:

    - D:\SonarQube\sonarqube-5.1.1\MSBuild\MSBuild.SonarQube.Runner.exe begin /key:Test6MSBKey /name:Test6MSBProject /version:2.0
    - msbuild Test6MSB.sln
    - D:\SonarQube\sonarqube-5.1.1\MSBuild\MSBuild.SonarQube.Runner.exe end

All of my resharper errors are skipped, with the following issues being logged to the command window:

10:20:11 PM  22:20:11.013 INFO  - Sensor org.sonar.plugins.resharper.CSharpReSharperProvider$CSharpReSharperSensor@1659dbf
10:20:11 PM  22:20:11.013 INFO  - Parsing ReSharper report: D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB.xml
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 15 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 16 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 17 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 18 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 19 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 20 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Form1.cs" is not
in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 21 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Program.cs" is no
t in SonarQube.
10:20:11 PM  22:20:11.054 INFO  - Skipping the ReSharper issue at line 22 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Program.cs" is no
t in SonarQube.
10:20:11 PM  22:20:11.055 INFO  - Skipping the ReSharper issue at line 23 whose
file "D:\Chris\Schneider\Projects\SampleCode\Test6MSB\Test6MSB\Properties\Assemb
lyInfo.cs" is not in SonarQube.
10:20:11 PM  22:20:11.055 INFO  - Sensor org.sonar.plugins.resharper.CSharpReSha
rperProvider$CSharpReSharperSensor@1659dbf (done) | time=42ms

I'm not sure why the code files are not being put into SonarQube using the MSBuild Runner. Prior to trying to use the MSBuild runner, I was able to successfully use the sonar-runner.bat(v2.4) on a similar solution with the same Resharper plugin and xml created using the resharper command line inspectcode executable and the resharper issues were succesfully added to sonarqube for the solution/project.

However, I noticed that the documentation for the C# 4.1 plugin said that usage of sonar-runner is now deprecated, and to use the MSBuildSonarQube Runner 1.0 to analyze C# projects, however, when I try to use the MSBuildSonarQube Runner, I get the skipping errors as stated above.

Pascal Berger
  • 4,262
  • 2
  • 30
  • 54
Chris West
  • 21
  • 2
  • Are the results uploaded if your projects do not have "test" in the path? (see http://stackoverflow.com/questions/31722389/msbuild-sonarqube-runner-in-command-line) – duncanp Aug 05 '15 at 09:16
  • This was the problem. Once I took "test" out of the path, the results were uploaded into the sonarqube database. Thanks for the link and your response. – Chris West Aug 12 '15 at 13:52
  • please tag your question with `sonarqube` and `msbuild` or `c#` to make them easier to find. – Dinesh Bolkensteyn Sep 11 '15 at 09:58

1 Answers1

0

This is caused by a bug in the test project detection mechanism present in the MSBuild SonarQube Runner version 1.0. It has been fixed in the newly release 1.0.1, see https://jira.sonarsource.com/browse/SONARMSBRU-121

Dinesh Bolkensteyn
  • 2,971
  • 1
  • 17
  • 20
  • We still have the same issue, but is not caused by the above test detection. Is this the registered ticket related to that? https://jira.sonarsource.com/browse/SONARRSHPR-21. – Rik van den Berg Dec 07 '15 at 17:05
  • Yep that's very much possible - you can verify that by looking if these "skipped" issues actually appear in SonarQube or not - if they do, then these log messages are clearly redundant and covered by SONARRSHPR-21 – Dinesh Bolkensteyn Dec 08 '15 at 11:05