Visual-studio – Turn off auto formatting in Visual Studio

code-formattingformattingvisual-studiovisual-studio-2008

I prefer my own style of code formatting as opposed to Visual Studio's default settings. I've turned off auto-formatting options in Tools→Options. In most cases, it works.

However, after using any of the built-in refactorings, Visual Studio clobbers my settings with its default settings. How do I keep VS from doing that?

Best Solution

I had this problem while writing VB in an aspx page.

The solution was to go to 'Tools > Options > Text Editor > Basic > VB Specific' and turn 'Pretty Listing' OFF.


Note - in Visual Studio 2015 this can be found at:

Tools > Options > Text Editor > Basic > Advanced