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. Supported versions: MSBuild 16 and higher.
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).
##[debug]Processed: ##vso[task.logissue type=error;]07:16:29.822 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. Supported versions: MSBuild 16 and higher.
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).
07:16:29.822 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. Supported versions: MSBuild 16 and higher.
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).
07:16:29.822 Generation of the sonar-properties file failed. Unable to complete the analysis
You can see my intention in build stage is only to validate liquibase command and once that code is validated and I need to publish artifact to jfrog. you can see below tasks I am using and also you can see series of tasks after validate task , and that series of tasks consist above sonar tasks and it gave above error. Could you please suggest what is wrong in below?
If the former – you will have to build your code, and should probably move SonarQube analysis back to the build stage rather than this publishing stage. .NET analysis requires a full build.
I have used following tasks: but it is failing at sonaranalysis task it seems:
and I am seeing error as below , Please suggest
##[error]Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
##[debug]Processed: ##vso[task.logissue type=error;]Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
Error: LinkageError occurred while loading main class org.sonarsource.scanner.cli.Main
java.lang.UnsupportedClassVersionError: org/sonarsource/scanner/cli/Main has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0
##[debug]Process exited with code 1 and signal null for tool 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\sonar-scanner\bin\sonar-scanner.bat'
##[debug]STDIO streams have closed and received exit code 1 and signal null for tool 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\sonar-scanner\bin\sonar-scanner.bat'
##[error][ERROR] SonarQube Server: Error while executing task Analyze: The process 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;][ERROR] SonarQube Server: Error while executing task Analyze: The process 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
##[debug]task result: Failed
##[error]The process 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\sonar-scanner\bin\sonar-scanner.bat' failed with exit code 1
##[debug]Processed: ##vso[task.issue type=error;source=TaskInternal;]The process 'D:\AzDOAgents\agent2\_work\_tasks\SonarQubeAnalyze_6d01813a-9589-4b15-8491-8164aeb38055\7.1.1\son
You’ll need to make sure that Java 17 is installed on the build agent, and that this Java installation is pointed to by the JAVA_HOME_17_X64 variable (or the JAVA_HOME environment variable)
In the screenshot you shared in an earlier version of your post, it looks like you have a step that checks for Java 17 that has a warning sign next to it. It’s also clear from that screenshot that JAVA_HOME_17_X64 is undefined.