Scanning dotnet project is getting error of c/ c++

Hi All,

While scanning a dotneet project i am getting the below error

INFO: Sensor CFamily [cpp]
INFO: CFamily plugin version: 6.41.0.60884
##[error]ERROR: 

The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper and setting the property "sonar.cfamily.build-wrapper-output" or by using Clang Compilation Database and setting the property "sonar.cfamily.compile-commands". None of these two options were specified.

If you don't want to analyze C/C++/Objective-C files, then prevent them from being analyzed by setting the following properties:

    sonar.c.file.suffixes=-
    sonar.cpp.file.suffixes=-
    sonar.objc.file.suffixes=-
ERROR: 

The only way to get an accurate analysis of C/C++/Objective-C files is by using the SonarSource build-wrapper and setting the property "sonar.cfamily.build-wrapper-output" or by using Clang Compilation Database and setting the property "sonar.cfamily.compile-commands". None of these two options were specified.

out project don’t have c or c++ files could you please help on it

You probably have some files in there you aren’t aware of – it might be interesting to run your analysis with the build wrapper and see what else is analyzed.

Turning on DEBUG logs for the analysis will also make it clear what files are being analyzed, and indexed as what langauge (sonar.verbose=true).

I think the error message is, otherwise, quite clear!

You can find documentation on adding analysis parameters here.

Hi Colin,
Thanks for responding i solved the issue by scanning the code with MSBuild for Sonar Scanner and got the issue solved

1 Like