Code formatting in Visual Studio Code is not working on C# code
For C# you need to
- Open a folder (not a file) that contains at least one
.sln
file - In the bottom bar you will see a blinking flame. Wait until it stops blinking.
- Click on the flame. You are going to be asked to select a file.
- In case you selected a
.sln
file click again on the flame and select a.csproj
file. - You can now format all
.cs
files which are part of the selected project usingShift + Alt + F
.