Problem
Indentation in C# code always defaults to four spaces, even when different values are configured in Settings > Editor > Code Style > C#.
When indentation is set to three spaces using an external editor and the solution is reloaded, selecting Code > Auto-Indent Lines resets the indentation to four spaces.
Cause
The configured code style settings could be overridden. The issue might be caused by the EditorConfig and StyleCop settings in File | Settings | Editor | Code Style.
Resolution
- Open File | Settings | Editor | Code Style.
- Uncheck the Detect and use existing file indents for editing option.
- Disable EditorConfig and/or StyleCop support, if enabled.
Comments
0 comments
Please sign in to leave a comment.