Disable Visual Studio code formatting in Razor

后端 未结 9 1213
死守一世寂寞
死守一世寂寞 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:51

    The places to look:

    Tools -> Options -> Web Essentials -> HTML -> Auto-format HTML on Enter
    

    (Requires installation of Web Essentials extension)

    Set to False

    Tools -> Options -> Text Editor -> HTML -> Advanced -> Format on Paste
    

    Set to False

    With these settings I have no trouble in Visual Studio 2013.

    I used to have to press Ctrl-Z far too often, and if you forgot untangling the mess once your code was written and tested was a huge pain. I feel Microsoft could do alot to help users configure this as well as make it more accessible.

提交回复
热议问题