✅ What is happening with my VS?
See the video... When I type semicolon in razor file, VS automatically put multiple blank lines somehwere in the code block, why?
14 Replies
Oh my god hahahaha it almost looks like a coworker pranked you or something
Do you have any 3rd party code formatting extensions installed?
Only for XAML (XamlStyler) but it never ever did this thing 😄
If that's the case this may be a bug with visual studio. Try poking around the text editor settings for C#'s code style
Perhaps somewhere here?

Also update VS. If it's really a bug, it may be fixed in a newer version that you might not have
Just updated because this is crazy 😄
still a thing after the update
what helped was changing this from true to false

didnt even know this is a thing in VS
Oh wow well yeah that's one way to do it. Glad that solved it
yeah, even went as far as opening rider (I really dont like rider)... thanks
Out of curiosity, if you type a bunch of semicolons like you did in the video, but with the "Format on type" thing off, then you format the document manually (CTRL K + CTRL D for visual studio), do the newlines appear?
no, newlines only appear when the format on type is on
formatting the file manually works as expected, only placing whitespace before each ;
Yeah, insane bug. Oh well, hope it's fixed in a later release. Have to turning off the autoformatter isn't ideal
I'm somewhat okay with it being turned off as I press ctrl+k+d every time before saving 😄