Razor code formatting issue with Visual Studio 2022

Viewed 2994

With Visual Studio 2022 (17.0.2) and Resharper 2021.3, I have a formatting issue with C# tags in Razor (.cshtml) views.

Given the following existing code : Before

If I type Ctrl K+D (format entire document), VS produces the following result : After

The HTML tags formatting is fine, but the Razor tags formatting is a lot harder to read, especially for nested lambdas at the bottom.

I have tried different things but I can't figure in VS Settings or Resharper Settings the proper option to manage these rules.

Thanks

1 Answers
Related