

This way your team can keep things consistent across projects. Here is the same doc reformatted in VS:Īt this point I'm comforted that the spaces have been defeated and that cooler heads have prevailed - at least for this project.NET Extensions to EditorConfigĮven better, if your editor supports it, you can include "EditorConfig Extensions" for specific files or languages. VS Format Document commands will use tabs rather than spaces for this project. Notice the warning at the bottom where VS lets me know that this project has conventions that are different than my own.

I'll open this project in Visual Studio 2017 which supports the EditorConfig file natively. Whitespace appears as pale dots in this editor. Here in Notepad2 we can see someone has used spaces for whitespace, like a savage. You'll check this file in WITH your project so that everyone on the team shares the team's values. I've set mine in this example to just *.cs, but you could also say or just if you like, as well as have multiple sections. I'll use a dotnet new console example hello world app.

I'm surprised more people don't know about it and use it, so this blog post is my small way of getting the word out.
#Fxcop visual studio 2017 download code
Teams can fight but the problem of formatting code across teams is solved by EditorConfig. I choose working I choose the 3rd option: working code- Gina Trapani ️ December 27, 2015 Tabs or spaces? There's even an insane (IMHO) assertion that the spaces people make more money. The country is divided with no end in sight.
