Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# formatter broken in ms-dotnettools.csharp-1.25.0-linux-x64 #5223

Closed
vdbg opened this issue May 24, 2022 · 7 comments · Fixed by #5225
Closed

C# formatter broken in ms-dotnettools.csharp-1.25.0-linux-x64 #5223

vdbg opened this issue May 24, 2022 · 7 comments · Fixed by #5225
Labels

Comments

@vdbg
Copy link

vdbg commented May 24, 2022

Trying to format a C# file with ms-dotnettools.csharp-1.25.0-linux-x64 installed gives error message: "there is no formatter for 'csharp' files installed"

Reverting to ms-dotnettools.csharp-1.24.4-linux-x64 fixes it.

VS version: code/stable,stable,now 1.67.2-1652812855 amd64 [installed]
OS version: Ubuntu 20.04.4 LTS

@JoeRobich
Copy link
Member

@vdbg Please share your complete OmniSharp Log from the VS Code Output pane.

@vdbg
Copy link
Author

vdbg commented May 24, 2022

[ERROR] Error: Found dotnet version 5.0.408. Minimum required version is 6.0.100.
Starting OmniSharp server at 5/24/2022, 2:53:36 PM

Note: the extension auto-upgraded itself from ms-dotnettools.csharp-1.24.4-linux-x64 to ms-dotnettools.csharp-1.25.0-linux-x64

@JoeRobich
Copy link
Member

Starting in 1.25.0 O# will run by default against an installed .NET 6 SDK (see the announcement at #5120). If you want to continue running against a system install of Mono, you can set omnisharp.useModernNet to false in your settings.

@vdbg
Copy link
Author

vdbg commented May 24, 2022

My system isn't on Mono

dotnet-apphost-pack-5.0/focal,now 5.0.17-1 amd64 [installed,automatic]
dotnet-host/focal,now 6.0.5-1 amd64 [installed,automatic]
dotnet-hostfxr-5.0/focal,now 5.0.17-1 amd64 [installed,automatic]
dotnet-runtime-5.0/focal,now 5.0.17-1 amd64 [installed,automatic]
dotnet-runtime-deps-5.0/focal,now 5.0.17-1 amd64 [installed,automatic]
dotnet-sdk-5.0/focal,now 5.0.408-1 amd64 [installed]
dotnet-targeting-pack-5.0/focal,now 5.0.0-1 amd64 [installed,automatic]

@JoeRobich
Copy link
Member

@vdbg Then you will need to install the .NET 6 SDK.

@vdbg
Copy link
Author

vdbg commented May 24, 2022

Yes, my issue is fixed.

It may make sense to disable auto-upgrades of packages on systems where the new required dependencies aren't met. Or to provide a direct explicit error message in the modal dialog (vs. "there is no formatter for 'csharp' files installed"). That'd would minimize the disruption to others.

@filipw
Copy link
Contributor

filipw commented May 30, 2022

It is also worth mentioning that .NET 5 has reached the end of life already https://dotnet.microsoft.com/en-us/platform/support/policy/dotnet-core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants