couple of weeks ago I installed Visual Studio Code on my Windows machine. It is lightweight and I love it. But there is one problem that drives me crazy. The program cannot format .cs files. If I open .Net Core project, there is no problem on formatting. I changed the language from bottom right to C# and saved the file locally still no success. Is there any way to format code in single .cs file? I know there is already an asked question here for this problem but the solutions does not apply if there is no project created.
            Asked
            
        
        
            Active
            
        
            Viewed 611 times
        
    1 Answers
2
            Use the command pallet (crtl-shift-P), type "format" and select "format code". Assuming the extension for the current language supports that.
TypeScript does, but C# does not.
You could raise an issue (if one does not already exist).
 
    
    
        Richard
        
- 106,783
- 21
- 203
- 265
- 
                    Oops... will update. Appears this is a per-language operation and the C# extension doesn't. – Richard Oct 19 '16 at 12:07
- 
                    Thanks for the clarification. I have been wondering about this one. – Hasan Hasanov Oct 21 '16 at 17:58
 
    