Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

220
Vistas
Bad auto formatting in razor page file for <text> blocks - VS2022

In a razor page file (.cshtml), when I use for example ; or {, in @<text> block or anything except for razor syntax, then the file is auto-formatted, the same as if I use Ctrl+K+D.

The issue is that EACH time my file is formatted, EVERY content inside a @<text> block will be indented.

Example:

.OnDone(@<text>
    foo();
 </text>)

after writing the second ; it became (and all other @<text> block in my file)

.OnDone(@<text>
        foo();
        foo2();
</text>)

I already deactivated the option Use adaptative formatting. I tried in Options > Text Editor > JavaScript/TypeScript > Formatting and unchecked everthing in Automatic Formatting but without success.

Important to mention that this behavior is only in VS2022 and not in VS2019.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda