ERROR: Error during SonarScanner execution java.lang.UnsupportedClassVersionError: during asp.net project analysis

Currently I am using the SonarQube - Version 9.0.1 and scanner - C:\sonar-scanner-msbuild-5.2.2.33595-net46

  • I am trying to achieve the scan the asp.net frame work project

@si_thu Careful, you’re token is in plain text in your screenshot. Better revoke it now.

Apparently, the scanner still picks up Java 8 (see line INFO: Java 1.8.0_261). The config you mention (wrapper.java.command) is for SonarQube itself, not the scanner. And the scanner is still using Java 8. Make sure that Java 11 is used on the machine where you run the analysis, or at least for the scanner execution (you can look at tools like jenv for this).