Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

221
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda