Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!
We are trying to use SonarQube extension 5.10 for AzureDevOps Server.
Our Application is ASP.net web application
Could you please help to figure out, why it’s failing when code scanning.
Also doubt whether we have to go one level inside the from parent folder.
Thanks.
Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarQube server.
Version : 5.10.0
Author : sonarsource
Help : Version: 5.10.0. This task is not needed for Maven and Gradle projects since the scanner should be run as part of the build.
C:\Users\dhanuka84\agent_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe end
SonarScanner for MSBuild 5.10
Using the .NET Framework version of the Scanner for MSBuild
Post-processing started.
##[error]02:25:18.34 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
The project has not been built - the project must be built in between the begin and end steps
An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
The begin, build and end steps have not all been launched from the same folder
None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
02:25:18.34 The SonarScanner for MSBuild integration failed: SonarQube was unable to collect the required information about your projects.
Possible causes:
The project has not been built - the project must be built in between the begin and end steps
An unsupported version of MSBuild has been used to build the project. Currently MSBuild 14.0.25420.1 and higher are supported.
The begin, build and end steps have not all been launched from the same folder
None of the analyzed projects have a valid ProjectGuid and you have not used a solution (.sln)
02:25:18.34 Generation of the sonar-properties file failed. Unable to complete the analysis.
##[error]02:25:18.356 Post-processing failed. Exit code: 1
02:25:18.356 Post-processing failed. Exit code: 1
##[error]The process ‘C:\Users\dhanuka84\agent_work_tasks\SonarQubePrepare_15b84ca1-b62f-4a2a-a403-89b77a063157\5.10.0\classic-sonar-scanner-msbuild\SonarScanner.MSBuild.exe’ failed with exit code 1
Finishing: Run Code Analysis
I have change the project structure and configured the pipeline as YAML file, but same issue
Pipeline
pool:
name: Default
demands:
msbuild
visualstudio
vstest
java
#Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See YAML schema reference | Microsoft Learn #Your build pipeline references an undefined variable named ‘Parameters.solution’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See YAML schema reference | Microsoft Learn #Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See YAML schema reference | Microsoft Learn #Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See YAML schema reference | Microsoft Learn #Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See YAML schema reference | Microsoft Learn #Your build pipeline references the ‘BuildPlatform’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See YAML schema reference | Microsoft Learn #Your build pipeline references the ‘BuildConfiguration’ variable, which you’ve selected to be settable at queue time. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab, and then select the option to make it settable at queue time. See YAML schema reference | Microsoft Learn #Your build pipeline references an undefined variable named ‘Parameters.ArtifactName’. Create or edit the build pipeline for this YAML file, define the variable on the Variables tab. See YAML schema reference | Microsoft Learn