I am trying to integrate SonarQube with TFS 2013 and trying to build a solution using Visual Studio 2013.
I have followed everything from the documentation provided by the SonarQube. https://github.com/SonarSource/sonar-.net-documentation/releases/download/1.1.0/SonarQube-Setup-Guide-For-Net-Users-V-1-1-0.pdf
This is the log I am getting.
Overall Build Process
00:18
Overall build process
00:00
Update build number
00:18
Run on agent (reserved build agent Default Agent - cvm-511)
00:00
Initialize environment
00:02
Get sources from Team Foundation Version Control
00:00
Associate the changesets that occurred since the last good build
00:10
Compile, Test and Publish
00:03
Run optional script before MSBuild
00:07
Run MSBuild
00:05
Built $/TeleHealthEx/HeathExService/HeathExService.sln for default targets.
00:03
Built $/TeleHealthEx/HeathExService/HealthExDAL/HealthExDAL.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExUtility/HealthExUtility.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExModels/HealthExModels.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExEF/HealthExEF.csproj for default targets.
AppointmentInfoDA.cs (32): The variable 'ex' is declared but never used
AppointmentInfoDA.cs (52): The variable 'ex' is declared but never used
DoctorDetailsDL.cs (82): The variable 'ex' is declared but never used
00:01
Built $/TeleHealthEx/HeathExService/HealthExModels/HealthExModels.csproj for default targets.
00:02
Built $/TeleHealthEx/HeathExService/HealthExEF/HealthExEF.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExModels/HealthExModels.csproj for default targets.
00:03
Built $/TeleHealthEx/HeathExService/HealthExBAL/HealthExBAL.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExModels/HealthExModels.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExDAL/HealthExDAL.csproj for default targets.
BookMarkBL.cs (73): The variable 'ex' is declared but never used
BookMarkBL.cs (99): The variable 'ex' is declared but never used
DoctorDetailsBL.cs (68): The variable 'ex' is declared but never used
00:01
Built $/TeleHealthEx/HeathExService/PayU/PayU.csproj for default targets.
00:01
Built $/TeleHealthEx/HeathExService/HealthExVidyo/HealthExVidyo.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExUtility/HealthExUtility.csproj for default targets.
00:04
Built $/TeleHealthEx/HeathExService/HealthExService1/HealthExService.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExUtility/HealthExUtility.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExModels/HealthExModels.csproj for default targets.
00:00
Built $/TeleHealthEx/HeathExService/HealthExBAL/HealthExBAL.csproj for default targets.
MSBuild Log File
00:00
Run optional script after MSBuild
00:00
Run optional script before Test Runner
00:00
Run VS Test Runner
00:00
**Run optional script after Test Runner
2:26:05 PM Failed to locate the code coverage command line tool
Post-processing failed. Exit code: 1
Exception Message: TF270015: 'MSBuild.SonarQube.Runner.exe' returned an unexpected exit code. Expected '0'; actual '1'. See the build logs for more details. (type UnexpectedExitCodeException)
Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)**
00:00
Handle Exception
00:00
Create a bug for the build failure
00:00
Rethrow the exception so the build will stop
00:01
Perform Final Actions On Agent
00:01
Copy binaries to drop
00:00
Reset the Environment
Work item '669: Build Failure in Build: HealthExServiceBuild_20150831.5' was opened by the build.
Please guide me in the right direction to solve this.
Unfortunately,
CodeCoverage.exe
is part of the coverage tools that ship with Visual Studio 2013 Premium and above and Visual Studio 2015 Enterprise.I'm afraid that getting this feature to work will require a higher tier of Visual Studio installed on the build server.
The MSDN page explaining the coverage feature also mentions this limitation:
And:
A Visual Studio installation providing
CodeCoverage.exe
is required to be on the build machine with the MSBuild SonarQube Runner TFS integration. This limitation will be solved with the upcoming 1.0.1 release: https://jira.sonarsource.com/browse/SONARMSBRU-130