My build failed when I enable SonarQube analysis on my project : I have a lot of errors on my code behind for Razor files.
Sample of error:
RankTableComponent.razor.cs(10,48): error CS0103: The name ‘Color’ does not exist in the current context
It seems the same issue than this topic: SonarScanner does not support .NET 6 Razor Compiler / Source Generators
- The workaround works but it isn’t good solution for me.
- SonarQube: 9.9
- SonarScanner for MSBuild 5.14
- MSBuild version 17.6.8+c70978d4d for .NET