views:

392

answers:

3

I am interested in formatting all the files in a Visual Studio (ver. 2005) project all at once. Any idea?

Currently, there is a way to format a single document by doing something like Edit->Advanced->Format Document. However, I don't see a single command to format all the files of a project all at once.

I am hoping there is a macro or an add-in that will do the trick.

A: 

I know of no command that will do this for all files in a project for you, but when you have a code file opened in Visual Studio, you can use the Edit->Advanced->Format Document command (or hit CTRL+K followed by CTRL+D on the keyboard). This will fix the formatting in the current code file.

It's probably not too complicated to create a Macro that does this for the full project.

Fredrik Mörk
+2  A: 

www. jetbrains .com /resharper/index.html

Resharper provides code cleanup and formatting and that is just a fraction of its functionality...

Skyler
+3  A: 

Tim Abell wrote a macro to do this on his blog

Dan Fuller