Sonarcloud: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported

  • ALM used Bitbucket Cloud
  • CI system used NONE
  • Scanner command used when applicable sonar-scanner.bat
  • Languages of the repository C++
  • Error observed
19:46:30.737 WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files:
19:46:30.738 WARN: Microsoft extension activated by "/clr:pure" compiler option is not supported, skip analysis of files:
19:46:30.739 INFO: Subprocess(es) done in 21ms
19:46:30.739 INFO: 0 compilation units analyzed
19:46:30.794 INFO: ------------------------------------------------------------------------
19:46:30.794 INFO: EXECUTION FAILURE
19:46:30.794 INFO: ------------------------------------------------------------------------


19:46:30.864 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:

  • Steps to reproduce
  • Potential workaround

There is the C++ code, compiled with MSBuild.exe 16.4.0
build-wrapper-dump.json had been generated successfully.
But during the run of sonar-scanner.bat it stopped with the error.
Full scan log:

19:46:17.447 INFO: Scanner configuration file: sonar-scanner-4.2.0.1873-windows\bin\..\conf\sonar-scanner.properties
19:46:17.452 INFO: Project root configuration file: NONE
19:46:17.480 INFO: SonarQube Scanner 4.2.0.1873
19:46:17.480 INFO: Java 11.0.3 AdoptOpenJDK (64-bit)
19:46:17.480 INFO: Windows 10 10.0 amd64
19:46:17.614 DEBUG: keyStore is : 
19:46:17.614 DEBUG: keyStore type is : pkcs12
19:46:17.614 DEBUG: keyStore provider is : 
19:46:17.614 DEBUG: init keystore
19:46:17.615 DEBUG: init keymanager of type SunX509
19:46:17.843 DEBUG: Create: .sonar\cache
19:46:17.844 INFO: User cache: .sonar\cache
19:46:17.844 DEBUG: Create: .sonar\cache\_tmp
19:46:17.846 DEBUG: Extract sonar-scanner-api-batch in temp...
19:46:17.851 DEBUG: Get bootstrap index...
19:46:17.852 DEBUG: Download: https://sonarcloud.io/batch/index
19:46:18.504 DEBUG: Get bootstrap completed
19:46:18.517 DEBUG: Create isolated classloader...
19:46:18.541 DEBUG: Start temp cleaning...
19:46:18.547 DEBUG: Temp cleaning done
19:46:18.547 DEBUG: Execution getVersion
19:46:18.560 INFO: SonarQube server 8.0.0
19:46:18.561 INFO: Default locale: "en_US", source code encoding: "UTF-8"
19:46:18.562 DEBUG: Work directory: .scannerwork
19:46:18.563 DEBUG: Execution execute
19:46:18.901 DEBUG: SonarCloud 8.0.0.3896
19:46:18.992 INFO: Load global settings
19:46:19.276 DEBUG: GET 200 https://sonarcloud.io/api/settings/values.protobuf | time=282ms
19:46:19.321 INFO: Load global settings (done) | time=329ms
19:46:19.326 INFO: Server id: 74E9293D-AWHW8ct9-T_TB3XqouNu
19:46:19.329 INFO: User cache: .sonar\cache
19:46:19.333 INFO: Load/download plugins
19:46:19.333 INFO: Load plugins index
19:46:19.377 DEBUG: GET 200 https://sonarcloud.io/api/plugins/installed | time=44ms
19:46:19.415 INFO: Load plugins index (done) | time=81ms
19:46:19.628 INFO: Load/download plugins (done) | time=295ms
19:46:19.833 DEBUG: Plugins:
19:46:19.833 DEBUG:   * SonarCSS 1.1.1.1010 (cssfamily)
19:46:19.833 DEBUG:   * SonarPLSQL 3.4.1.2576 (plsql)
19:46:19.833 DEBUG:   * SonarScala 1.7.0.883 (sonarscala)
19:46:19.833 DEBUG:   * SonarC# 8.1.0.13383 (csharp)
19:46:19.833 DEBUG:   * Vulnerability Analysis 8.1.0.675 (security)
19:46:19.834 DEBUG:   * SonarJava 6.0.0.20538 (java)
19:46:19.834 DEBUG:   * SonarHTML 3.2.0.2082 (web)
19:46:19.834 DEBUG:   * SonarFlex 2.5.1.1831 (flex)
19:46:19.834 DEBUG:   * SonarXML 2.0.1.2020 (xml)
19:46:19.834 DEBUG:   * SonarTS 2.1.0.4359 (typescript)
19:46:19.834 DEBUG:   * SonarVB 8.1.0.13383 (vbnet)
19:46:19.834 DEBUG:   * SonarSwift 4.2.2.77 (swift)
19:46:19.834 DEBUG:   * SonarCFamily 6.6.0.13759 (cpp)
19:46:19.834 DEBUG:   * SonarPython 2.3.0.5351 (python)
19:46:19.835 DEBUG:   * JaCoCo 1.0.2.475 (jacoco)
19:46:19.835 DEBUG:   * Mercurial 1.1.2 (scmmercurial)
19:46:19.835 DEBUG:   * SonarGo 1.7.0.883 (go)
19:46:19.835 DEBUG:   * SonarKotlin 1.7.0.883 (kotlin)
19:46:19.835 DEBUG:   * SonarTSQL 1.4.0.3334 (tsql)
19:46:19.835 DEBUG:   * SonarApex 1.7.0.883 (sonarapex)
19:46:19.835 DEBUG:   * SonarJS 6.1.0.11503 (javascript)
19:46:19.835 DEBUG:   * SonarRuby 1.7.0.883 (ruby)
19:46:19.835 DEBUG:   * Vulnerability Rules for C# 8.1.0.675 (securitycsharpfrontend)
19:46:19.836 DEBUG:   * Vulnerability Rules for Java 8.1.0.675 (securityjavafrontend)
19:46:19.836 DEBUG:   * License for SonarLint 8.0.0.3896 (license)
19:46:19.836 DEBUG:   * SonarCOBOL 4.4.0.3403 (cobol)
19:46:19.836 DEBUG:   * Vulnerability Rules for Python 8.1.0.675 (securitypythonfrontend)
19:46:19.836 DEBUG:   * Git 1.10.0.1898 (scmgit)
19:46:19.836 DEBUG:   * SonarPHP 3.3.0.5166 (php)
19:46:19.836 DEBUG:   * SonarABAP 3.8.0.2034 (abap)
19:46:19.836 DEBUG:   * Vulnerability Rules for PHP 8.1.0.675 (securityphpfrontend)
19:46:19.867 INFO: Loaded core extensions: developer-scanner
19:46:19.891 DEBUG: Installed core extension: developer-scanner
19:46:20.472 INFO: Process project properties
19:46:20.482 DEBUG: Process project properties (done) | time=10ms
19:46:20.483 INFO: Execute project builders
19:46:20.484 DEBUG: Execute project builder: org.sonar.plugins.csharp.CSharpGlobalProtobufFileProcessor
19:46:20.486 DEBUG: Execute project builder: org.sonar.plugins.vbnet.VbNetGlobalProtobufFileProcessor
19:46:20.489 INFO: Execute project builders (done) | time=6ms
19:46:20.495 INFO: Project key: 
19:46:20.495 INFO: Base dir: 
19:46:20.495 INFO: Working dir: .scannerwork
19:46:20.495 DEBUG: Project global encoding: UTF-8, default locale: en_US
19:46:20.498 DEBUG: Creating module hierarchy
19:46:20.499 DEBUG:   Init module 'PLIN'
19:46:20.500 DEBUG:     Base dir: 
19:46:20.501 DEBUG:     Working dir: \.scannerwork
19:46:20.501 DEBUG:     Module global encoding: UTF-8, default locale: en_US
19:46:20.516 INFO: Load project settings for component key: 
19:46:20.605 DEBUG: GET 200 https://sonarcloud.io/api/settings/values.protobuf?component= | time=87ms
19:46:20.609 INFO: Load project settings for component key: '' (done) | time=90ms
19:46:20.679 DEBUG: Could not detect any CI vendor
19:46:20.681 INFO: Load project branches
19:46:20.725 DEBUG: GET 200 https://sonarcloud.io/api/project_branches/list?project= | time=44ms
19:46:20.755 INFO: Load project branches (done) | time=74ms
19:46:20.760 INFO: Load projects for organization ''
19:46:21.464 DEBUG: GET 200 https://sonarcloud.io/api/alm_integration/list_repositories?organization= | time=704ms
19:46:21.472 INFO: Load projects for organization '' (done) | time=712ms
19:46:21.474 INFO: Load project pull requests
19:46:21.522 DEBUG: GET 200 https://sonarcloud.io/api/project_pull_requests/list?project= | time=47ms
19:46:21.526 INFO: Load project pull requests (done) | time=52ms
19:46:21.529 INFO: Load branch configuration
19:46:21.532 INFO: Load branch configuration (done) | time=3ms
19:46:21.587 DEBUG: Available languages:
19:46:21.587 DEBUG:   * CSS => "css"
19:46:21.587 DEBUG:   * PL/SQL => "plsql"
19:46:21.587 DEBUG:   * Scala => "scala"
19:46:21.587 DEBUG:   * C# => "cs"
19:46:21.587 DEBUG:   * Java => "java"
19:46:21.588 DEBUG:   * HTML => "web"
19:46:21.588 DEBUG:   * JSP => "jsp"
19:46:21.588 DEBUG:   * Flex => "flex"
19:46:21.588 DEBUG:   * XML => "xml"
19:46:21.588 DEBUG:   * VB.NET => "vbnet"
19:46:21.588 DEBUG:   * Swift => "swift"
19:46:21.588 DEBUG:   * C => "c"
19:46:21.588 DEBUG:   * C++ => "cpp"
19:46:21.588 DEBUG:   * Objective-C => "objc"
19:46:21.589 DEBUG:   * Python => "py"
19:46:21.589 DEBUG:   * Go => "go"
19:46:21.589 DEBUG:   * Kotlin => "kotlin"
19:46:21.589 DEBUG:   * T-SQL => "tsql"
19:46:21.589 DEBUG:   * Apex => "apex"
19:46:21.589 DEBUG:   * JavaScript => "js"
19:46:21.589 DEBUG:   * TypeScript => "ts"
19:46:21.589 DEBUG:   * Ruby => "ruby"
19:46:21.590 DEBUG:   * COBOL => "cobol"
19:46:21.590 DEBUG:   * PHP => "php"
19:46:21.590 DEBUG:   * ABAP => "abap"

/.../

19:46:24.414 DEBUG: 'x64\Release\Settings.obj' indexed with language 'null'
19:46:24.416 DEBUG: 'x64\Release\stdafx.obj' indexed with language 'null'
19:46:24.418 DEBUG: 'x64\Release\vc142.pdb' indexed with language 'null'
19:46:24.420 INFO: 139 files indexed
19:46:24.420 INFO: 0 files ignored because of scm ignore settings
19:46:24.420 INFO: Quality profile for c: Sonar way
19:46:24.420 INFO: Quality profile for cpp: Sonar way
19:46:24.420 INFO: ------------- Run sensors on module PLIN
19:46:24.578 INFO: Load metrics repository
19:46:24.624 DEBUG: GET 200 https://sonarcloud.io/api/metrics/search?f=name,description,direction,qualitative&ps=500&p=1 | time=46ms
19:46:24.645 INFO: Load metrics repository (done) | time=67ms
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.cglib.core.ReflectUtils$1 (file:.sonar/cache/a89f1943fc75b65becd9fb4ecab8d913/sonar-tsql-plugin.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of net.sf.cglib.core.ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
19:46:27.442 DEBUG: 'JavaSquidSensor' skipped because there is no related file in current project
19:46:27.443 DEBUG: 'CobolSquidSensor' skipped because there is no related file in current project
19:46:27.447 DEBUG: 'Import external issues report' skipped because one of the required properties is missing
19:46:27.448 DEBUG: 'SonarCSS Metrics' skipped because there is no related file in current project
19:46:27.448 DEBUG: 'SonarCSS Rules' skipped because there is no related file in current project
19:46:27.449 DEBUG: 'Import of stylelint issues' skipped because there is no related file in current project
19:46:27.449 DEBUG: 'PL/SQL Sensor' skipped because there is no related file in current project
19:46:27.450 DEBUG: 'Scala Sensor' skipped because there is no related file in current project
19:46:27.451 DEBUG: 'Scoverage sensor for Scala coverage' skipped because one of the required properties is missing
19:46:27.451 DEBUG: 'Import of Scalastyle issues' skipped because there is no related file in current project
19:46:27.451 DEBUG: 'Import of Scapegoat issues' skipped because there is no related file in current project
19:46:27.451 DEBUG: 'C# Properties' skipped because there is no related file in current project
19:46:27.452 DEBUG: 'Import of Checkstyle issues' skipped because there is no related file in current project
19:46:27.452 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
19:46:27.453 DEBUG: 'Import of SpotBugs issues' skipped because there is no related file in current project
19:46:27.453 DEBUG: 'SurefireSensor' skipped because there is no related file in current project
19:46:27.453 DEBUG: 'Removed properties sensor' skipped because there is no related file in current project
19:46:27.454 DEBUG: 'Flex' skipped because there is no related file in current project
19:46:27.454 DEBUG: 'Flex Cobertura' skipped because there is no related file in current project
19:46:27.454 DEBUG: 'XML Sensor' skipped because there is no related file in current project
19:46:27.454 DEBUG: 'SonarTS' skipped because there is no related file in current project
19:46:27.454 DEBUG: 'VB.NET Properties' skipped because there is no related file in current project
19:46:27.455 DEBUG: 'SonarSwift' skipped because there is no related file in current project
19:46:27.455 DEBUG: 'Import of SwiftLint issues' skipped because there is no related file in current project
19:46:27.456 DEBUG: 'gcov' skipped because one of the required properties is missing
19:46:27.457 DEBUG: 'llvm-cov' skipped because one of the required properties is missing
19:46:27.458 DEBUG: 'cppunit' skipped because one of the required properties is missing
19:46:27.458 DEBUG: 'VisualStudioCoverage' skipped because one of the required properties is missing
19:46:27.459 DEBUG: 'bullseye' skipped because one of the required properties is missing
19:46:27.459 DEBUG: 'Python Sensor' skipped because there is no related file in current project
19:46:27.459 DEBUG: 'Cobertura Sensor for Python coverage' skipped because there is no related file in current project
19:46:27.459 DEBUG: 'PythonXUnitSensor' skipped because there is no related file in current project
19:46:27.460 DEBUG: 'PylintSensor' skipped because there is no related file in current project
19:46:27.460 DEBUG: 'PylintImportSensor' skipped because there is no related file in current project
19:46:27.461 DEBUG: 'Import of Bandit issues' skipped because there is no related file in current project
19:46:27.461 DEBUG: 'SonarGo' skipped because there is no related file in current project
19:46:27.461 DEBUG: 'Go Unit Test Report' skipped because there is no related file in current project
19:46:27.462 DEBUG: 'Go Cover sensor for Go coverage' skipped because one of the required properties is missing
19:46:27.462 DEBUG: 'Import of go vet issues' skipped because there is no related file in current project
19:46:27.462 DEBUG: 'Import of Golint issues' skipped because there is no related file in current project
19:46:27.463 DEBUG: 'Import of GoMetaLinter issues' skipped because there is no related file in current project
19:46:27.463 DEBUG: 'Import of GolangCI-Lint issues' skipped because there is no related file in current project
19:46:27.463 DEBUG: 'Kotlin Sensor' skipped because there is no related file in current project
19:46:27.464 DEBUG: 'Import of detekt issues' skipped because there is no related file in current project
19:46:27.465 DEBUG: 'Import of Android Lint issues' skipped because one of the required properties is missing
19:46:27.465 DEBUG: 'T-SQL Sensor' skipped because there is no related file in current project
19:46:27.465 DEBUG: 'Apex Sensor' skipped because there is no related file in current project
19:46:27.465 DEBUG: 'Test coverage Sensor for Apex' skipped because there is no related file in current project
19:46:27.469 DEBUG: 'Import of PMD issues' skipped because one of the required properties is missing
19:46:27.469 DEBUG: 'JavaScript analysis' skipped because there is no related file in current project
19:46:27.470 DEBUG: 'SonarJS Coverage' skipped because there is no related file in current project
19:46:27.471 DEBUG: 'Import of ESLint issues' skipped because one of the required properties is missing
19:46:27.471 DEBUG: 'TypeScript analysis' skipped because there is no related file in current project
19:46:27.471 DEBUG: 'Import of TSLint issues' skipped because one of the required properties is missing
19:46:27.472 DEBUG: 'Ruby Sensor' skipped because there is no related file in current project
19:46:27.472 DEBUG: 'Import of RuboCop issues' skipped because one of the required properties is missing
19:46:27.472 DEBUG: 'SimpleCov Sensor for Ruby coverage' skipped because there is no related file in current project
19:46:27.473 DEBUG: 'PHP sensor' skipped because there is no related file in current project
19:46:27.473 DEBUG: 'Analyzer for "php.ini" files' skipped because there is no related file in current project
19:46:27.473 DEBUG: 'AbapSquidSensor' skipped because there is no related file in current project
19:46:27.478 DEBUG: 'Generic Coverage Report' skipped because one of the required properties is missing
19:46:27.478 DEBUG: 'Generic Test Executions Report' skipped because one of the required properties is missing
19:46:27.479 DEBUG: 'C#' skipped because there is no related file in current project
19:46:27.479 DEBUG: 'C# Tests Coverage Report Import' skipped because there is no related file in current project
19:46:27.479 DEBUG: '[Deprecated] C# Integration Tests Coverage Report Import' skipped because there is no related file in current project
19:46:27.479 DEBUG: 'C# Unit Test Results Import' skipped because there is no related file in current project
19:46:27.479 DEBUG: 'VB.NET' skipped because there is no related file in current project
19:46:27.479 DEBUG: 'VB.NET Tests Coverage Report Import' skipped because there is no related file in current project
19:46:27.479 DEBUG: '[Deprecated] VB.NET Integration Tests Coverage Report Import' skipped because there is no related file in current project
19:46:27.480 DEBUG: 'VB.NET Unit Test Results Import' skipped because there is no related file in current project
19:46:27.481 DEBUG: Sensors : JavaXmlSensor -> HTML -> JaCoCo XML Report Importer -> CFamily -> JavaSecuritySensor -> CSharpSecuritySensor -> PhpSecuritySensor -> PythonSecuritySensor
19:46:27.482 INFO: Sensor JavaXmlSensor [java]
19:46:27.484 INFO: Sensor JavaXmlSensor [java] (done) | time=2ms
19:46:27.484 INFO: Sensor HTML [web]
19:46:27.489 INFO: Sensor HTML [web] (done) | time=5ms
19:46:27.489 INFO: Sensor JaCoCo XML Report Importer [jacoco]
19:46:27.494 DEBUG: No reports found
19:46:27.494 INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=5ms
19:46:27.494 INFO: Sensor CFamily [cpp]
19:46:27.494 INFO: SonarCFamily plugin version: 6.6.0.13759
19:46:27.495 INFO: Using build-wrapper output: \bw_output\build-wrapper-dump.json
19:46:27.495 INFO: Available processors: 4
19:46:27.495 INFO: Using 1 thread for analysis according to value of "sonar.cfamily.threads" property.
19:46:27.498 DEBUG: Unpacking analyzer to: \.scannerwork\.sonartmp\16325252327707899216
19:46:29.868 INFO: Load project repositories
19:46:29.919 DEBUG: GET 200 https://sonarcloud.io/batch/project.protobuf?key= | time=51ms
19:46:29.924 INFO: Load project repositories (done) | time=56ms
19:46:29.924 DEBUG: 'ComboBoxItem.h' generated metadata with charset 'UTF-8'
19:46:29.975 DEBUG: 'MyForm.cpp' generated metadata with charset 'UTF-8'
19:46:30.030 DEBUG: 'GlobalFrameTableHandler.h' generated metadata with charset 'UTF-8'
19:46:30.057 DEBUG: 'resource.h' generated metadata with charset 'UTF-8'
19:46:30.062 DEBUG: Not enough content in 'resource.h' to have CPD blocks, it will not be part of the duplication detection
19:46:30.078 DEBUG: 'PCANBasicCLR.h' generated metadata with charset 'UTF-8'
19:46:30.136 DEBUG: 'Code.cpp' generated metadata with charset 'UTF-8'
19:46:30.138 DEBUG: Not enough content in 'Code.cpp' to have CPD blocks, it will not be part of the duplication detection
19:46:30.145 DEBUG: 'stdafx.h' generated metadata with charset 'UTF-8'
19:46:30.151 DEBUG: Not enough content in 'stdafx.h' to have CPD blocks, it will not be part of the duplication detection
19:46:30.179 DEBUG: 'Form1.h' generated metadata with charset 'UTF-8'
19:46:30.271 DEBUG: 'stdafx.cpp' generated metadata with charset 'UTF-8'
19:46:30.277 DEBUG: Not enough content in 'stdafx.cpp' to have CPD blocks, it will not be part of the duplication detection
19:46:30.282 DEBUG: 'NameForm.cpp' generated metadata with charset 'UTF-8'
19:46:30.292 DEBUG: Not enough content in 'NameForm.cpp' to have CPD blocks, it will not be part of the duplication detection
19:46:30.298 DEBUG: 'Code.h' generated metadata with charset 'UTF-8'
19:46:30.306 DEBUG: 'AssemblyInfo.cpp' generated metadata with charset 'UTF-8'
19:46:30.325 DEBUG: 'Frame_Dlg.h' generated metadata with charset 'UTF-8'
19:46:30.351 DEBUG: 'NameForm.h' generated metadata with charset 'UTF-8'
19:46:30.365 DEBUG: 'Frame_Dlg.cpp' generated metadata with charset 'UTF-8'
19:46:30.378 DEBUG: 'MessageStatus.h' generated metadata with charset 'UTF-8'
19:46:30.390 DEBUG: 'Form1.cpp' generated metadata with charset 'UTF-8'
19:46:30.424 DEBUG: 'GlobalFrameTableHandler.cpp' generated metadata with charset 'UTF-8'
19:46:30.440 DEBUG: 'Settings.cpp' generated metadata with charset 'UTF-8'
19:46:30.442 DEBUG: Not enough content in 'Settings.cpp' to have CPD blocks, it will not be part of the duplication detection
19:46:30.448 DEBUG: 'Settings.h' generated metadata with charset 'UTF-8'
19:46:30.500 DEBUG: 'MyForm.h' generated metadata with charset 'UTF-8'
19:46:30.645 DEBUG: 'PLIN.cpp' generated metadata with charset 'UTF-8'
19:46:30.657 DEBUG: 'PLinApiCLR.h' generated metadata with charset 'UTF-8'
19:46:30.718 INFO: Cache is explicitly disabled: Optional[false]
19:46:30.736 WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files: [stdafx.cpp]
19:46:30.737 WARN: Microsoft extension activated by "/clr:nostdlib" compiler option is not supported, skip analysis of files: [AssemblyInfo.cpp, Code.cpp, Form1.cpp, Frame_Dlg.cpp, GlobalFrameTableHandler.cpp, MyForm.cpp, NameForm.cpp, PLIN.cpp, Settings.cpp]
19:46:30.738 WARN: Microsoft extension activated by "/clr:pure" compiler option is not supported, skip analysis of files: [\AppData\Local\Temp\1\.NETFramework,Version=v4.0.AssemblyAttributes.cpp]
19:46:30.739 INFO: Subprocess(es) done in 21ms
19:46:30.739 INFO: 0 compilation units analyzed
19:46:30.794 INFO: ------------------------------------------------------------------------
19:46:30.794 INFO: EXECUTION FAILURE
19:46:30.794 INFO: ------------------------------------------------------------------------
19:46:30.794 INFO: Total time: 13.367s
19:46:30.864 INFO: Final Memory: 27M/100M
19:46:30.864 INFO: ------------------------------------------------------------------------
19:46:30.864 ERROR: Error during SonarQube Scanner execution
java.lang.IllegalStateException: The "build-wrapper-dump.json" file was found but 0 C/C++/Objective-C files were analyzed. Please make sure that:
  * you are using the latest version of the build-wrapper and the SonarCFamily analyzer
  * you are correctly invoking the scanner with correct configuration  * your compiler is supported
  * you are wrapping your build correctly
  * you are wrapping a full/clean build
  * you are providing the path to the correct build-wrapper output directory
	at com.sonar.cpp.plugin.CFamilySensor.execute(CFamilySensor.java:356)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:62)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:393)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:389)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:352)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:141)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:72)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:66)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.base/java.lang.reflect.Method.invoke(Unknown Source)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy0.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:189)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:138)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:112)
	at org.sonarsource.scanner.cli.Main.execute(Main.java:75)
	at org.sonarsource.scanner.cli.Main.main(Main.java:61)

Hi @Alexander1,

as you can see from the logs some files are skipped because Microsoft extensions enabled by /clr option are not supported.

Do you really need /clr and for all files`? If not you can disable extensions and your files are going to get analyzed.

How to disable CLR

Thank you, Massimo @mpaladin

1 Like

Hi Massimo,

I’m running into the same problem. A lot of my cpp projects have this option enabled and I can’t change this setting. Why is this not supported by the C-analysis and is there any solution existing to make it work?

Hi @sat,

why cannot you change this setting? Are you really using Microsoft extensions?

It is not supported because it is not standard C++ and not widely used. Moreover we rely on Clang frontend which doesn’t support such extensions.

Hi Massimo,

thanks for your answer!

I can’t change this because I need those CLR flags to get my projects compiled properly for managed c++ applications. And I really do not want to have an extra project for every single project just for sonarqube (I’m talking about hundreds of projects all together).

I don’t really get, why SonarQube gets affected by compiler flags at all. It’s running a static source code analysis and these flags affect the type of artefact at the end of the compilation.
Why can’t you just ignore those kind of flags and go ahead?

Hi @sat,

/clr flags enable C++/CLI Microsoft language extensions, they don’t simply change the artifact creation.

Could you clarify, this states that “Microsoft Component Extensions for Runtime Platforms: C++/CLI and C++/CX” are supported.

Hi @Chibizov,

This is out-of-date, we were supporting those extensions with the old version of the analyzer, and since we moved to a Clang based analyzer we are not supporting it anymore, I’ll have that changed.