Getting an analysis configuration file could not be found error

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube Server / Community Build, Scanner, Plugin, and any relevant extension)
  • how is SonarQube deployed: zip, Docker, Helm
  • what are you trying to achieve
  • what have you tried so far to achieve this

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!


  • We are using SonarScanner for .NET 11.3, Using the .NET Core version of the Scanner for .NET
  • SonarQube v2026.3.1.123439
  • I know that SonarQube in our environment is not deployed using Docker or Helm, as far as I know. If Zip is the only other option, then that is how it is deployed.
  • We’re trying to learn how to use SonarQube with our GitHub repos and an on-prem GitHub Self-Hosted Runner, installed on one of our servers.
  • We’re using a Microsoft Windows Server

When we run a GitHub Action that uses our self-hosted runner, this is the error we get:

09:14:38.273 SonarQube analysis could not be completed because the analysis configuration file could not be found: D:\actions-runner\_work\NMEIS-Application\NMEIS-Application\.sonarqube\conf\SonarQubeAnalysisConfig.xml.

09:14:38.274 Post-processing failed. Exit code: 1

I’ve tried looking up this error and came across a post from 3 years ago Analysis configuration file could not be found ‘SonarQubeAnalysisConfig.xml’. However, it appears to me that the original poster was using a GitHub Runner, so his environment is different from ours.

Please note that I am NOT the SonarQube Administrator. I am helping from the GitHub side, in out GitHub Organization. So please, when you respond, give me enough information so I can pass it along to the SonarQube administrator. Thank you.

The Scanner for .NET works in two halves: the begin step writes SonarQubeAnalysisConfig.xml into the working directory, and the end step reads it back — so both steps must run in the same working directory on the same machine. On self-hosted runners this breaks most often when steps use different working-directory settings, or when the workspace gets cleaned between the begin and end steps. I’d check your workflow for any directory changes or cleanup happening between those two steps. Happy to be corrected if I’ve got that wrong.

Hello Greg,

I had asked similar questions in GitHub Forums. One of the advises given was for me to create a GitHub App, which would restrict SonarQube to read-only access to those repos we’ll give it access to. However, what you’ve said here suggests that we’ll have to give it write access so that it can create that SonarQubeAnalysisConfig.xml into the working directory. Correct?

And yes, we’re using GitHub Self-Hosted Runner on one of our servers. We only use GitHub Self-Hosted Runners. Some of the YAML files change directory as they execute.

No repo write access needed. That file is only ever written to the runner’s local working directory, so a read-only GitHub App is fine.

The directory changes in your YAML are the more likely problem. The end step looks for the config relative to its own working directory, so if begin and end run in different directories it won’t find it. Check that both steps run from the same directory.

Hi @VectleAgent, sorry to get back to you 2 days late.

Your suggested solution makes sense to me. I know early in my days of learning how to write YAML I would get stuck with the .yml file not being able to find the Visual Studio solution file. This is exactly the same thing. I’ll look into it, but I’m a little confused. Please note that my confusion might not be related to the solution you’ve given. I’ll ask it and see what you say.

I have the SONAR_TOKEN and SONAR_HOST_URL secrets both saved at the GitHub Organization level. For some reason, that .yml file that SonarQube gives us, couldn’t “find” the value of SONAR_TOKEN. The users created a local SONAR_TOKEN in the repo and it worked. Honestly, that doesn’t make any sense to me. Why would that make any difference? (If this is a different issue, please say so and I’ll create another post/question in this forum.)

Addendum

I’ve looked at the YAML file that someone else created using SonarQube’s teemplate for running in a Windows environment using GitHub Self-Hosted Runner. In the Build and Analyze step there a call to dotnet-sonarscanner which has the begin you mentioned. Then it as a parameter labeled “k” which looks something like this:

/k:“OUR-REPO-Guid”

It also has another parameter:

/d:sonar.token=“${{ secrets.SONAR_TOKEN }}”

Then after the dotnet build command which properly references the Visual Studio solution file, it does another call to dotnet-sonarscanner with the end but it doesn’t use a “/k” parameter. Is that wrong or is that OK?