Install C# Extension when VSCode on Linux Mint

  • 468
  • 0

VSCode C# Extension on Linux Mint Problem

When you see following error message in vs code

System.TypeLoadException: Could not load type of field 'McMaster.Extensions.CommandLineUtils.CommandLineApplication:_validationErrorHandler' (36) due to: Could not load file or assembly 'System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
  at OmniSharp.Stdio.StdioCommandLineApplication..ctor () [0x00000] in <e2653a02ab1f423abb805f2353ec9507>:0 
  at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00006] in <9671bf457f144c419fb0cdee3ca10088>:0 
  at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <48aa3fb56cea4bd5ab9bfdf1170dd033>:0 
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

Resolve Steps

* Download version C# Extension 1.15.2 (https://github.com/OmniSharp/omnisharp-vscode/files/2370110/csharp-1.15.2.zip)

* Uninstall the C# extension in VSCode

* Ctrl + Shift + P Extensions: Install from VSIX ...  and select C# Extension 1.15.2 vsix

* Reload VSCode