Hey,
I am using SonarQube Scanner for MSBuild 3.0.2.656 and sonarqube server version 6.4 (build 25310).
It is a multi language build with java, cpp and csharp modules - java and cpp are working fine, but I have problems with csharp. Msbuild is the one bundled with Microsoft.NET framework (v4.0.30319).
I am invoking the scanner as an executable using ANT. SonarQube.Analysis.xml is a custom one containing all required properties:
<Property Name="sonar.login">myUser</Property>
<Property Name="sonar.password">myPass</Property>
<Property name="sonar.projectKey">myProject:key</Property>
<Property name="sonar.projectName">myProject.name</Property>
<Property name="sonar.projectVersion">24154cv45</Property>
Last lines in my log:
"c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\client\Nirvana DotNet.sln" (Rebuild target) (1) ->
"c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj" (Rebuild target) (80) ->
RealmMonitor.cs(270,30): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(320,42): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(495,38): warning CS0168: The variable 'ex' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(1324,36): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(1356,34): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(798,38): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(804,42): warning CS0168: The variable 'e2' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(942,55): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(1190,34): warning CS0168: The variable 'e' is declared but never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
RealmMonitor.cs(878,26): warning CS0414: The field 'com.pcbsys.nirvana.nAdminAPI.apps.RealmMonitor._channelMonitor.maxMemory' is assigned but its value is never used [c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\applications\RealmMonitor\RealmMonitor.csproj]
1057 Warning(s)
0 Error(s)
Time Elapsed 00:00:36.15
===============
Executing command:
SonarQube.Scanner.MSBuild.exe end
===============
SonarQube Scanner for MSBuild 3.0.2
Default properties file was found at c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\SonarQube.Analysis.xml
Loading analysis properties from c:\users\nirdevadm\jenkins\workspace\10.2.S_sonar\prod\csharp\SonarQube.Analysis.xml
Post-processing started.
The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
1. The project has not been built - the project must be built in between the begin and end steps
2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 upwards are supported
3. The begin, build or end steps have not all been launched from the same folder
Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
14:26:53.995 Creating a summary markdown file...
14:26:53.997 Post-processing failed. Exit code: 1
Any ideas why this happens and how to solve it?
Thanks