SonarLint and .Net Core

We are using SonarLint and SonarQube, working on .net Framework projects Sonarlint works fine, but we discovered on our .Net Core projects SonarLint does not.

Any suggestions on how to fix it?

Thanks

Hi @Jlubbe. Welcome to the community.

Some questions:

  • which version of VS are you using? (I’m assuming you are using VS)
  • which version of SonarLint?
  • which language(s) are you analysing?
  • are you using Connected Mode?
  • is SonarLint reporting any issues in the IDE for your .NET Core project?

Hello @duncanp thanks

  1. Microsoft Visual Studio Professional 2019 - Version 16.8.2
  2. SonarLint - 4.33.1.28913
  3. C# .net Framework 4.6 upwards that work, none of the .net core works
  4. Yes we are using it in connected mode
  5. No issues are reported, no highlights, the binding was done and refresh is also reporting no issues

Regards
Johan

Hi @Jlubbe

Does your IDE display any issues for the .NET Core app in the following zip?
NetCoreConsoleApp1.zip (1.4 KB)

I’d expect to see two issues in program.cs:

Also, do any issues appear for your .NET Core project if it is not in Connected Mode?

Hello @duncanp

It does so why not on our projects?

image

Have you configured VS to disable live analysis?

Hello @duncanp

it does not seem to check the sonarqube rules at all, things like sync/async is not shown at all in .net core apps

Hi @Jlubbe,

Still the same issue

Hello @Jlubbe,

To repeat @duncanp’s questions, can you please check if your project settings have code analysis enabled?