You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.NET Core SDK (reflecting any global.json):
Version: 2.1.300
Commit: adab45bf0c
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17134
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.1.300\
Host (useful for support):
Version: 2.1.0
Commit: caa7b7e2ba
.NET Core SDKs installed:
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.300 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
VS Code version: 1.24.0
C# Extension version: 1.15.2
Steps to reproduce
Type a class, such as public class Testing { }
Expected behavior
In most editors, after typing the opening brace, a closing brace is automatically added. Some editors choose to format at this point, moving the opening brace to its own line and the closing brace to its own line, and placing the cursor on a blank line between them automatically indented.
Actual behavior
Upon pressing enter, the opening brace remains on the same line as the declaration, the closing brace is moved to its own line, and the cursor is placed on a blank line between them, like so:
public class Testing {
|
}
I have tried creating the omnisharp.json file in %USERPROFILE%\.omnisharp\ with the desired settings, but it does not seem to have an impact. Format on typing is enabled in VS Code. Typing something like public bool Test {get;set;} gets formatted to public bool Test { get; set; } automatically. Manually triggering formatting through the right click context menu formats opening braces to their own line as desired, so it shouldn't be a configuration issue. The formatting is just not applied while typing.
The text was updated successfully, but these errors were encountered:
Environment data
dotnet --info
output:VS Code version: 1.24.0
C# Extension version: 1.15.2
Steps to reproduce
Type a class, such as
public class Testing { }
Expected behavior
In most editors, after typing the opening brace, a closing brace is automatically added. Some editors choose to format at this point, moving the opening brace to its own line and the closing brace to its own line, and placing the cursor on a blank line between them automatically indented.
Actual behavior
Upon pressing enter, the opening brace remains on the same line as the declaration, the closing brace is moved to its own line, and the cursor is placed on a blank line between them, like so:
I have tried creating the omnisharp.json file in
%USERPROFILE%\.omnisharp\
with the desired settings, but it does not seem to have an impact. Format on typing is enabled in VS Code. Typing something likepublic bool Test {get;set;}
gets formatted topublic bool Test { get; set; }
automatically. Manually triggering formatting through the right click context menu formats opening braces to their own line as desired, so it shouldn't be a configuration issue. The formatting is just not applied while typing.The text was updated successfully, but these errors were encountered: