Home > Software design >  Turn off .NET localization in Visual Studio Code
Turn off .NET localization in Visual Studio Code

Time:11-09

I'm using Visual Studio Code on non-English Windows, developing Web API project in .NET 6. All the errors and warnings in VS Code are not in English, but in the system language (in my case it's Czech). When using dotnet CLI from built-in PowerShell terminal (e. g. dotnet add package), the the output is non-English as well.

When I open the same project in Visual Studio 2019, all errors and warnings are in English.

How can I set VS Code to show .NET errors and warningns in English?

Note: My Visual Studio Code interface is entirely English, I have no language pack installed.

EDIT: I have tried to set set DOTNET_CLI_UI_LANGUAGE=en and CLI is now in English, but most of the errors and warnings remain localized.

CodePudding user response:

Seems this is a known issue with Omnisharp.

The recommended workaround is to navigate to your Omnisharp directory. You can find the path by looking at the Omnisharp logs.

OmniSharp server started.
    Path: C:\Users\Gabriel\.vscode\extensions\ms-vscode.csharp-1.16.1\.omnisharp\1.32.5\OmniSharp.exe
    PID: 144684

Inside the folder, look for the directory with the name for your locale. (Czech should be cs-CZ).

Inside the 'cs-CZ' folder, delete all DLLs that start with Microsoft.CodeAnalysis

Now the language of the errors and warnings should fall back to english.

  • Related