C# analysis now finds issues in .razor and .cshtml files

Hi .NET Folks

Today I’m happy to announce that we now support the analysis of .cshtml and .razor files in .NET projects. This is a much-requested feature and will help you keep your ASP.NET Core MVC, Razor, and Blazor applications clean.

If you are analyzing the impacted projects you can expect to see some new issues being raised from our existing rules as we scan these files. This might impact your quality gate and your code coverage - If you’re not ready for this feature yet you can disable it in your C# project settings.

This is available in SonarCloud today and will be in SonarQube 10.3. There is no support in SonarLint yet, we hope to have this for you soon.

We’d love to hear your feedback, so please let us know what you think.