Text of code.visualstudio.com › docs › csharp › formatting-linting as Styx crawled it on Nov 18, 2026. The page may have changed since. Only its words are kept, without pictures or layout.

Open the live page

Formatting and Linting

AI agents: See llms.txt for documentation discovery and navigation. Documentation articles are also available as Markdown by appending .md to the article URL. Join VS Code at Microsoft Ignite or catch the sessions online. A year of VS Code, wrapped. Explore the highlights. Formatting and Linting View as Markdown Ask in VS Code Ask in VS Code Insiders You can format your C# source code using the C# Dev Kit extension , a lightweight extension to enhance your C# development experience in Visual Studio Code.

Navigate to File > Preferences > Settings ( ⌘, (Windows, Linux Ctrl+, ) ) to customize how your .cs files are formatted. The Settings editor gives you a list of different formatting options (particularly under Commonly Used and Text Editor ) that you can adjust across your specific workspace or your entire user profile. How to support EditorConfig with C# Dev Kit EditorConfig (.editorconfig) files are supported with the EditorConfig for VS Code extension , letting you customize formatting options in your C# project.

These files are also used to override the user/workspace settings with the settings you specify in them. 6/6/2023