Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

csharp style rules defined in .editorconfig are ignored in Razor code blocks

$
0
0

I am setting up an `.editconfig` file to enforce certain conventions and code styles.
I have noticed that csharp style rules only seem to apply to *.cs files and not razor c# code blocks.

Take, as an example, this simple `.editconfig` file:

root = true# Default settings[*]csharp_prefer_braces = when_multiline:error

Works in a .cs file:test.cs file where editconfig rule works

But it does not work in a @code block of a razor file:test.cs file where editconfig rule does not work

Is this a know limitation? I am using Rider 2025.2.2.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>