SonarQubeAnalyze@4 fails with The base directory of the module '47FC3477-1769-3BF1-9D9C-F82E22B35809


  • SonarQube 9.9
  • Azure DevOps server 2020
  • Azure pipelines
  • CMake 3.26.3
  • Visual Studio 17 2022

I created a pipeline to run SonarQube analysis on the CMake project.
The project is C++/CLR DLL which I intend to pack as a NuGet package.

I run the following steps:

  1. CMake
  2. Azure pipelines task SonarQubePrepare@4
  3. Azure pipelines task MSBuild@1
  4. Azure pipelines task SonarQubeAnalyze@4
  5. Azure pipelines task SonarQubePublish@4

In step 4 I get the following error:
##[error]java.lang.IllegalStateException: The base directory of the module '47FC3477-1769-3BF1-9D9C-F82E22B35809' does not exist: C:\Agent1.1\_work\17\s\Medtronic.Native.VideoConstruction\CMakeFiles\CMakeScratch\TryCompile-967m7d

Things I tried:

  • Generate the CMake products in a directory above the sources
  • Generate the CMake products in a temp directory
  • Change project base dir
  • Add exclusions
  • Disabling the ZERO_CHECK project

I’m out of ideas on how to resolve that issue, I’d appreciate assistance.
log.txt (21.1 KB)


Welcome to the community!

Can we have the full debug job log, starting at least from step 2?

The analysis / scanner log is what’s output from the analysis command. Hopefully, the log you provide - redacted as necessary - will include that command as well.

This guide will help you find them.


Thanks for the prompt reply.
Here are the additional logs you asked for. (25.3 KB)


Thanks for the logs.

I think I probably should have asked for all of them. Could you share the one for that first step, too? The missing base directory has CMakeFiles in it. Does the CMake step do any cleanup before it exits?


The CMake step is #20.
All the rest of the steps are just miscellaneous configurations like setting the build number using GIT version.


Following some investigation I did, I noticed that CMake is running compilation to check the compiler.
The files of this check are deleted afterward.
Because I ran the SonarQubePrepare before the CMake (unlike I wrote in the original question) the analyzer was looking for them and failing when it couldn’t.
For the sake of testing I disabled that delete using --debug-trycompile.
The process was completed and the analysis phase is now failing with another error:

 The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed.

Digging around, lead me to this thread.
It is a very old version of SonarQube so my question is CLR still not supported?

Hey there

@inbar.barkai.mdt The contents of this post are still true today:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.