Your project contains C# files which cannot be analyzed..use the SonarScanner for .NET 5.x or higher

Windows Server 2022
SQL Server 2019
SonarQube 9.6.1 DE
JAVA SE 17

Hello community.

This time I want to ask about the problem I have when analyzing a NET CORE 6.0 project where when executing it throws the error

“Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see SonarScanner for .NET | SonarQube Docs

any ideas?

Thank you
Dario Flores

Hey there.

Have you read the documentation that the error message links?

https://redirect.sonarsource.com/doc/install-configure-scanner-msbuild.html

1 Like

Hi Colin.

First of all thanks for replying.

If I read this documentation:
*)I have the requirements.
*) I have dotnet-sonarscanner
*) Task sonar DevOps Extension 5.8.0

I’m running it from DevOps in a pipeline.

something I didn’t do?

Thank you

Good.

I continue with the problem, and I pass more information to see if someone can help me.

On the one hand, the pipeline logs tell me:

##[section]Starting: Run Code Analysis

Task : Run Code Analysis
Description : Run scanner and upload the results to the SonarQube server.
Version : 5.8.0
Author : sonarsource

and on the other it keeps throwing this:

WARN: Your project contains C# files which cannot be analyzed with the scanner you are using. To analyze C# or VB.NET, you must use the SonarScanner for .NET 5.x or higher, see SonarScanner for .NET | SonarQube Docs

I really don’t understand what the problem is :frowning:

Hello @Colin

Any idea what could be happening to me?

Thank you
Dario Flores