I know you can do it file by file.
Is there any way to do this in one step for all files in a project?
I am using Visual Studio 2015 and found a tool named BatchFormat: https://marketplace.visualstudio.com/items?itemName=vs-publisher-147549.BatchFormat
This did the job perfectly.
Install the tool, then right click on your solution in the solution explorer, then at the top of the menu you see batch format:
Whatever you select is applied to every file in your solution, as you can see in the screenshot, there are other options, you can also format every document.