Disable Visual Studio code formatting in Razor

后端 未结 9 1198
死守一世寂寞
死守一世寂寞 2020-12-13 17:13

This has been asked before: Why doesn't Visual Studio code formatting work properly for Razor markup?

But that question is a couple years old. And Razor formatti

9条回答
  •  一向
    一向 (楼主)
    2020-12-13 17:37

    Unfortunately the only way to prevent autoformatting on paste is to comment out the location where you're going to paste some new code and after the pasting operation to remove the commenting instructions.

    Search & Replace seems not to trigger auto-formatting. But pasting reformats the entire code block.

    This is terrible beyond words. It makes Visual Studio IDE virtually unusable for Razor editing. One has to use an external editor for Razor files.

    What's even worse, even the latest Visual Studio 2013 Update 1 crashes while editing Razor views all the time.

提交回复
热议问题