I have multipe c# solutions and we use NANT scripts to build the solutions. CI with jenkins job invokes the NANT scripts.
PFA NANT build file : all.build.txt
In jenkins job we simply invoke the attached build file target “FullBuild”. This target has depends on “sonarqube-begin, build, sonarqube-end” targets.
This setup works fine and generates report as well if I just build one sln. The same doesn’t work with multiple sln’s. The attached NANT has multiple references in the target “build”
Any help is appreciated and thanks in advance.
Below is the log:
sonarqube-end:
17:13:06 GMT+05:30
17:13:06 GMT+05:30 [exec] Starting ‘C:/Jenkins/tools/hudson.plugins.sonar.MsBuildSQRunnerInstallation/SonarQubeForMSBuild/SonarScanner.MSBuild.exe (end)’ in ‘C:\Jenkins\workspace\Test_develop’
17:13:06 GMT+05:30 [exec] SonarScanner for MSBuild 4.1
17:13:06 GMT+05:30 [exec] Using the .NET Framework version of the Scanner for MSBuild
17:13:06 GMT+05:30 [exec] Default properties file was found at C:\Jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\SonarQubeForMSBuild\SonarQube.Analysis.xml
17:13:06 GMT+05:30 [exec] Loading analysis properties from C:\Jenkins\tools\hudson.plugins.sonar.MsBuildSQRunnerInstallation\SonarQubeForMSBuild\SonarQube.Analysis.xml
17:13:06 GMT+05:30 [exec] Post-processing started.
17:13:06 GMT+05:30 [exec] The SonarQube MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
17:13:06 GMT+05:30 [exec] Possible causes:
17:13:06 GMT+05:30 [exec] 1. The project has not been built - the project must be built in between the begin and end steps
17:13:06 GMT+05:30 [exec] 2. An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0 upwards are supported
17:13:06 GMT+05:30 [exec] 3. The begin, build and end steps have not all been launched from the same folder
17:13:06 GMT+05:30 [exec] 4. None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
17:13:06 GMT+05:30 [exec] Generation of the sonar-properties file failed. Unable to complete SonarQube analysis.
17:13:06 GMT+05:30 [exec] 07:43:06.639 Creating a summary markdown file…
17:13:06 GMT+05:30 [exec] 07:43:06.641 Post-processing failed. Exit code: 1
17:13:06 GMT+05:30
17:13:06 GMT+05:30 BUILD FAILED - 0 non-fatal error(s), 7 warning(s)