1

Possible Duplicate:
Formatting - at once - all the files in a Visual Studio project

I know that Ctrl+E, Ctrl+D will format the entire document.

I have over 100 pages in my project and several projects in the solution.

Is there any easy way for format all documents within the project?

Community
  • 1
  • 1
Noah
  • 15,080
  • 13
  • 104
  • 148

2 Answers2

5

Do you have ReSharper? That lets you apply lots of kinds of code cleanup to all files in the solution, including code reformatting, sorting using directives and removing unused ones, etc.

It has a bunch of other features too, of course - thoroughly recommended. I don't know of a way of doing it without any VS add-ins though. It's possible that there's a free add-in which has this functionality too, of course.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
3

Here are some macros to format the entire solution in Visual Studio: macro1, macro2.

Pick one.

Alexandru C.
  • 3,337
  • 1
  • 25
  • 27