This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
I’m working on a .NET MAUI Blazor Hybrid app, and most of my code lives in Razor files. Under C# → Code Style → Formatting → General, I have the following settings configured:

and New Lines Setting looks like this

The problem is that when I write C# code inside Razor files, the braces automatically move to new lines as I type or press Enter. Disabling “format on typing” avoids it, but that’s inconvenient for this project and others. How can I fix this?
Visual Studio 2026 Version: 18.2.0
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]

I’m working on a .NET MAUI Blazor Hybrid app, and most of my code lives in Razor files. Under C# → Code Style → Formatting → General, I have the following settings configured:
and New Lines Setting looks like this

The problem is that when I write C# code inside Razor files, the braces automatically move to new lines as I type or press Enter. Disabling “format on typing” avoids it, but that’s inconvenient for this project and others. How can I fix this?
Visual Studio 2026 Version: 18.2.0