Turn off auto formatting in Visual Studio

Maciej picture Maciej · Apr 10, 2009 · Viewed 122.9k times · Source

I'm a code purist, preferring 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.

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?

Answer

Tango91 picture Tango91 · Mar 31, 2011

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