Scanner error: analysis configuration file could not be found

versions used SonarQube version 9
Scanner error: SonarQube analysis could not be completed because the analysis configuration file could not be found: …sonarqube\conf\SonarQubeAnalysisConfig.xml

Hi,

I’ve edited your title down to a more manageable summary.

There aren’t a lot of details here. Can you provide the details in the bug template?:

Template for a good bug report, formatted with Markdown:

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
  • steps to reproduce
  • potential workaround

 
Thx,
Ann

User getting the error provided:
SonarQube analysis could not be completed because the analysis configuration file could not be found: …sonarqube\conf\SonarQubeAnalysisConfig.xml

I went to the server and the file is NOT there.

this is a .NET application runing via gitllab

  • versions used (SonarQube, Scanner, Plugin, and any relevant extension)
    sonarqube-9.3.0.51899
  • error observed (wrap logs/code around triple quote ``` for proper formatting)
    SonarQube analysis could not be completed because the analysis configuration file could not be found: …sonarqube\conf\SonarQubeAnalysisConfig.xml
  • steps to reproduce
    ??
  • potential workaround
    none

also installed latest msbuild 5.5.3.43281-net46

Hi,

You might want to re-download/re-install SonarScanner for .NET. That file is supposed to be part of the bundle. Not only does it need to be there, but you need to edit it, as described in the docs.

 
HTH,
Ann

1 Like

I ran these two steps is there anything else that I need to do? Also is there a way to make the scanner use a specific java version without setting the JAVA_HOME at the system level?

  • Add $install_directory to your PATH environment variable.

.NET Core Global Tool

dotnet tool install --global dotnet-sonarscanner --version x.x.x

Hi,

Are you still getting an error?

 
Ann

after we upgraded java and restarted the servers it started working. sorry for the delay, I was waiting on confirmation from the customer.
thanks for all your help! :slight_smile:

OH and is there a way to make the scanner use a specific java version without setting the JAVA_HOME at the system level?
For instance on the SonarQube server(Linux) we modified the wrapper file to use as specific java version and not the default system version.
Can we do this in the msbuild(windows server) as well? possibly with the sonarqube-properties file?
we have multiple apps running on this server.
thanks again.

Hi,

Setting it as a property isn’t going to do any good because properties are read after the scanner starts up & by that time the version of Java is already in use.

Perhaps you could set the envvar per process?

 
Ann