SonarQube doesn't recognise 'nameof'?

csharp

(Catalin Ristache) #1

SonarQube Version 6.4 (build 25310)
Code like:

Please advise.

Thanks


(Valeri Hristov) #2

Could you please send us the versions of the following software that are installed and used on your build machine?

  • .NET Framework
  • Visual Studio Build Tools or Visual Studio installed on the build machine
  • Scanner for MSBuild
  • SonarQube VSTS Extension (if you are using VSTS/TFS and our extension)

I cannot reproduce the problem using Visual Studio 2017 and I suspect that you might be using much older version of Roslyn (the C# compiler) that behaves differently for nameof expressions, so having the versions of your environment could help a lot.


(Amaury Levé) #3

Hi @Catalin_Ristache,

I am marking this thread as resolved as there is no activity. Please feel free to get back to us if you are still experiencing some issue.

Cheers,
Amaury