Select Tools > Options > Text Editor > [ C# or Basic] > Code Style > General, and then click Generate .editorconfig file from settings. For more information, see Code style preferences. Code style rules are divided into following subcategories: Each of these subcategories defines its own syntax for specifying options.What is EditorConfig in Visual Studio?
Visual Studio looks for a file named .editorconfigin the directory of the opened file and in every parent directory. The search ends when it reaches the root filepath, or if an .editorconfigfile with root=trueis found. See also .NET code style conventions Supporting EditorConfig for a language service EditorConfig.org Features of the code editorWhat are code consistency settings in EditorConfig files?
Code consistency Settings in EditorConfig files let you maintain consistent coding styles and settings in a codebase, such as indent style, tab width, end of line characters, encoding, and more, regardless of the editor or IDE you use.What happens if I remove an EditorConfig file?
If you remove an EditorConfig file from your project or codebase and you want new lines of code to be formatted according to the global editor settings, you must close and reopen any open code files. Add an EditorConfig file to a project Open a project or solution in Visual Studio.