It seems you are experiencing issues with the "Keep Tabs" setting in Visual Studio 2026, despite having the appropriate settings configured. Here are a few things you might consider checking or trying:
- EditorConfig File: You mentioned that you do not have a
.editorconfigfile, but creating one at the solution level and specifyingindent_style = tabhas worked for you. This is a valid approach, as.editorconfigfiles can override the IDE settings and enforce consistent formatting across your project. - Advanced Text Editor Options: Ensure that you have configured the advanced text editor options correctly. The setting for using tabs can sometimes be affected by other configurations in the editor. You can check these settings under Tools > Options > Text Editor > All Languages > Tabs to confirm that "Keep Tabs" is selected.
- Adapting Formatting: Since you have turned off Adapting Formatting, Visual Studio should respect your tab settings. However, if you notice that it still converts tabs to spaces, double-check if there are any other formatting settings that might be conflicting.
- Language-Specific Settings: Make sure that the settings for C# specifically are also set to "Keep Tabs". Sometimes, language-specific settings can override the general settings.
- Updates and Known Issues: As for whether this is a known issue, it's always a good idea to check the Visual Studio release notes or forums for any reported bugs or issues related to formatting in the latest version. Microsoft may address such issues in future updates.
If none of these solutions work, it may be beneficial to report the issue to Microsoft through their feedback tools in Visual Studio, as they can provide more direct assistance or updates regarding known issues.
References: