MS Build command is failing after sonarqube begin step , but the same build command is working outside the sonarqube analysis stage

Issue - When I execute the above command in my pipeline job , it is failing at build step . It is showing there 12 errors in the build process ,but actually there is no error . If I use the same build command outside sonarqube analysis stage it is executed successfully.There are 4 modules in this application , but the issue is happening only with one module .

Sonarqube Scanner (Sonar scanner for MSBuild) Version - 4.10

Sonarqube Scanner plugin version in jenkins - 2.11

MSBuild Version - 16.9

.Net Framework version - 4.5

Sonarqube stage in jenkins pipeline:
withSonarQubeEnv(‘sonarqube’){
bat “Sonar_scanner_MSBuild_path begin /k:project key /v:$BUILD_ID”
bat “MSBuild_path solution_file /t:publish”
bat “Sonar_scanner_MSBuild_path> end”
}

Hello @M_K - welcome to the community.

Could you share the build logs showing the errors please?

This topic was automatically closed after 12 days. New replies are no longer allowed.