Skip to content

Automatically format when typing and format on return, don’t respect the newline options configured in C# New Line Settings #12703

@vsfeedback

Description

@vsfeedback

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:
Image

and New Lines Setting looks like this
Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    author: migration bot 🤖The issue was created by a issue mover bot. The author may not be the actual author

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions