Your project contains c# files which contain cannot be analysed with the scanner you are using. To analyze c# or VB.NET , you must use the SonarScanner for .NET 5.x or higher

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

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

SONARQUBE edition - Enterprise
Version - 8.9 LTS
In our project , we are unable to analyze c# file . Other files are getting analyzed. The above warning we are getting in Azure DevOps pipeline .

Please help.

I am using Stand Alone scanner instead of MS Build in Azure DevOps pipeline. Can that be the reason?

Hi,

Yes! You’ve found your own answer. :smiley:

 
Ann

But we are using VB, XML python and c#. With stand alone scanner , c# is not getting analyzed but the other two are getting analyzed. When I switch to MS Build, c# is getting analyzed but the other two are not getting.

Or do I need to creat another project for c#?

Hi,

This is covered in the docs

For newer SDK-style projects (used by .NET Core, .NET 5, and later), the SonarScanner for .NET will analyze all file types that are supported by the available language plugins unless explicitly excluded.

For older-style projects, the scanner will only analyze files that are listed in the .csproj or .vbproj project file…

You’ll find more details at the link.

 
HTH,
Ann

If I want to analyze python files with MS Build , then I need to provide the path of the python files in pipeline and then it will work. Right?

Hi,

You need to reference the python files in your project file. A pattern of **/*.py (or whatever) works well.

 
HTH,
Ann

That is fine. But the issue is that VB files should get analyzed . But only c# is getting analyzed not VB.

Hi,

We’ve gone from C# to Python to now VB. Please create a new thread and include your analysis logs.

 
Ann