Bagzli
Bagzli

Reputation: 6579

Visual studio 2022 / Resharper indents element after new line

I have some code in visual studio that looks like this: enter image description here

if I place my cursor at the end of the div with class "row" and press enter, that whole div loses its indentation and goes to start like this:

enter image description here

It has been driving me mad because I can't figure out what does it nor how to stop it. I have visual studio 2022 and I also have Resharper installed.

I'm fairly confident it has something to do with resharper, I just can't figure out what. If I disable resharper then this problem goes away. Resharper is updated to latest version.

Upvotes: 2

Views: 654

Answers (1)

wbsth
wbsth

Reputation: 45

Only solution I came up with was to turn off auto-formatting after pressing Enter (for Razor files).

(untick Resharper -> Options -> Behaviour -> Razor -> Auto-format on Enter)

Upvotes: 3

Related Questions