question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Format code returns: Sorry, but there is no formatter for 'csharp'-files installed.

See original GitHub issue

Environment data

dotnet --info output:

.NET Command Line Tools (2.1.2)

Product Information:
 Version:            2.1.2
 Commit SHA-1 hash:  5695315371

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.16299
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.2\

Microsoft .NET Core Shared Framework Host

  Version  : 2.0.3
  Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

VS Code version: Version 1.19.2 Commit 490ef761b76b3f3b3832eff7a588aac891e5fe80 Date 2018-01-10T16:16:25.767Z Shell 1.7.9 Renderer 58.0.3029.110 Node 7.9.0 Architecture ia32 C# Extension version: 1.13.1

Steps to reproduce

I did got extension C# FixFormat installed. I uninstalled it and after that i constantly just receive “Sorry, but there is no formatter for ‘csharp’-files installed”. Feels like omnisharp doesn’t install that part any more, i tried to reinstall omnisharp without success.

I didn’t find any errors or messages from omnisharp log or vscode developer console. Didn’t try debugmodes though.

Expected behavior

Format is invoked.

Actual behavior

Format is not invoked and error “Sorry, but there is no formatter for ‘csharp’-files installed.” appear in vscode.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:30 (15 by maintainers)

github_iconTop GitHub Comments

27reactions
savpekcommented, Jan 30, 2018

Ah got it, there was line "csharp.format.enable": false, in my user config, after cleared that it started working again. C# fixformat extensions seems to set it, tested to install it after cleared user settings … image

However other issues mentioned here may not be releated to this. Should this issue be closed or?

4reactions
ZeinSleimancommented, Apr 22, 2018

I checked that and it is true. I don’t have any other extensions installed. When u install it by default it should be set true. I removed any data related to extensions before I installed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Visual Studio Code doesn't format C# code - Stack Overflow
Press Ctrl + , to open the Settings panel. Change the editor.formatOnType setting to be enabled. This wasn't enabled by default in my...
Read more >
CSharpier - Code formatter - Visual Studio Marketplace
CSharpier is an opinionated code formatter for c#. It uses Roslyn to parse your code and re-prints it using its own rules.
Read more >
Visual Studio Code Doesn't Format C# Code - ADocLib
Code formatting# The C/C++ extension for Visual Studio Code supports source Format code returns: Sorry but there is no formatter for 'csharp'files installed....
Read more >
Dotnet Format and File Scoped Namespaces | Blog - Ardalis
The dotnet format tool is a great way to quickly apply formatting from your .editorconfig to your entire project or solution. It handles...
Read more >
Managing and Applying Code Formatting Rules - JetBrains
To reformat code with Code Cleanup · Make a selection in the editor to reformat code in the selection. · Set the caret...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found