If you have prettier as the default formatter as I do, you should do this:
-
This is where you should paste the below snippet.
This is my config:
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[csharp]": {
"editor.defaultFormatter": "ms-dotnettools.csharp"
}
}
For you to apply this configuration you need c# extension.