Hi,
We are trying to integrate Jenkins with SonarQube. We are analyzing a .NET application which has C# and Javascript files. Invoking sonar scanner from the Jenkins pipeline script. Only javascript files are getting reported in SonarQube Dashboard but not the C# files.
SonarQube Version : 6.7.5
SonarScanner Version : SonarScanner for Msbuild 4.7.1.2311 - .NET Fwk 4.6
Jenkins Version : 2.164.3
Msbuild Path: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin
MsBuild Version: 16.2.37902.0
Below are the warnings during execution
Analyzer working directory does not exist: 'C:\home\jenkins\OXP-NightlyBuild\.sonarqube\out\2\output-cs'. Analyzer results won't be loaded from this directory
Commands:
bat "${sqScannerMsBuildHome}\\SonarScanner.MSBuild.exe begin /k:OXP /n:OXP /v:2.0 /d:sonar.host.url=%SONAR_HOST_URL% /d:sonar.cs.dotcover.reportsPaths=${WORKSPACE}/artifacts/dotCover.html /d:sonar.cs.nunit.reportsPaths=${WORKSPACE}/artifacts/TestResults.xml /d:sonar.login=%SONAR_AUTH_TOKEN% /d:sonar.exclusions=Static/**/*,**/Concrete.cs,**/Interface.cs,Content/Csc/**/*,**/vendor/**/*,**/jquery*.js,**/*.xml,**/jquery*.js,**/vendor/**/*.js,**/dist/** /d:sonar.sourceEncoding=UTF-8 /d:sonar.verbose=true"
bat "\"${msBuildHome}\"\\MSBuild.exe *****.sln /p:Configuration=Release /p:Platform=\"Any CPU\" /p:OctoPackEnforceAddingFiles=true /p:DisableAnalyzers=True /p:RunOctoPack=true /p:OctoPackPackageVersion=${build_version}.%BUILD_NUMBER% /p:OctoPackPublishPackageToFileShare=${artifacts_path}"
bat "${sqScannerMsBuildHome}\\SonarScanner.MSBuild.exe end /d:sonar.login=%SONAR_AUTH_TOKEN%"
Please help regarding this issue.
Thanks in advance.
Regards,
Antony Alfred.