My team wants to share our code styling and formatting. We've been using Resharper for this and wanted to take advantage of the new native features in VS2017! What is the best way to do this?
Visual Studio 2017 will now respect settings from a .editorconfig file if it exists on disk, up to the project root. Currently this is supported on a per-project basis, not on a solution level (I believe R# may have supported this in the solution folder).
Almost every editor in VS should support basic editorconfig options, such as:
- indent_style
- indent_size
- tab_width
- end_of_line
Additionally, some languages also provide support for language-specific style guidelines. For .NET, see here.
Specifically for C# or VB, if you've configured your settings in VS Tools-> Options, there is also an option to generate an .editorconfig file capturing those settings:
Use this extension to generate code style and formatting options that integrate with your source control to effortlessly share solution-level settings. https://marketplace.visualstudio.com/items?itemName=SchabseSLaks.Rebracer
© 2022 - 2024 — McMap. All rights reserved.