I'm building and analyzing a sample C# project on a build server with the following configuration:
- Jenkins 1.630;
- SonarQube 5.3 with all the updates;
- FxCop 10.0
I put the following steps in Jenkins Job:
- SonarQube Scanner for MSBuild - Begin Analysis
- Build a Visual Studio project or solution using MSBuild (MSBuild 14)
- SonarQube Scanner for MSBuild - End Analysis
If in the default C# Profile are no FxCop rules, everything works fine: the project is compled without warnings then analyzed. If there is at least one FxCop, the build fails:
V:\JenkinsWkFolder\Test\.sonarqube\bin\targets\SonarQube.Integration.targets(402,5): error : FxCop must be installed when some of its rules are enabled in the SonarQube quality profile. FxCop is included as part of Visual Studio. [V:\JenkinsWkFolder\Test\CSharpConsoleApp\CSharpConsoleApp.csproj]
Done Building Project "V:\JenkinsWkFolder\Test\CSharpConsoleApp\CSharpConsoleApp.csproj" (Rebuild target(s)) -- FAILED.
Done Building Project "V:\JenkinsWkFolder\Test\CITest.sln" (rebuild target(s)) -- FAILED.
Build FAILED.
"V:\JenkinsWkFolder\Test\CITest.sln" (rebuild target) (1) ->
"V:\JenkinsWkFolder\Test\CSharpConsoleApp\CSharpConsoleApp.csproj" (Rebuild target) (2) ->
(FailIfFxCopNotInstalled target) ->
V:\JenkinsWkFolder\Test\.sonarqube\bin\targets\SonarQube.Integration.targets(402,5): error : FxCop must be installed when some of its rules are enabled in the SonarQube quality profile. FxCop is included as part of Visual Studio. [V:\JenkinsWkFolder\Test\CSharpConsoleApp\CSharpConsoleApp.csproj]
0 Warning(s)
1 Error(s)
FxCop is installed on the build server, while Visual Studio is not. Where does MsBuildSonarRunner looks for the FxCop executable?
I don't know if you need some other info, please feel free to ask more details. Thanks in advance. Best Regards,
Mario.
Properties Content: PATH=C:\Program Files (x86)\Microsoft Fxcop 10.0;C:\....
Is there any deeper debug option other thanAdditional arguments: /d:sonar.verbose=true
in SonarQube Scanner for MSBuild - Begin Analysis? – Mario