Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use the Razor editor found in Visual Studio 2019 in Visual Studio 2022?

enter image description here

enter image description here

Visual studio 2022 does not align code. Code suggestions do not work in HTML pages.

I want like this.

enter image description here

I try a lot of solutions but doesnt work.

like image 405
Fazıl Ahmet AYDINLI Avatar asked Sep 07 '25 16:09

Fazıl Ahmet AYDINLI


1 Answers

Go to Tools → Options → Text Editor → HTML → Advanced and set the "Use legacy Razor editor for ASP.NET Core" to true.

Enabled Legacy Razor Editor

like image 154
OFG Avatar answered Sep 10 '25 07:09

OFG