トラブル:Debian 10のVisual Studio CodeでC# extensionが動かない

環境

現象

Debian 10にmono-runtime, Visual Studio Code, C# extensionをインストールするとC# extensionが動かない:

f:id:hikaen2:20200113193246p:plain

Starting OmniSharp server at 1/13/2020, 1:57:42 PM
    Target: /home/taro/src/tenuki-cs/tenuki-cs.sln

OmniSharp server started with Mono 5.18.0.
    Path: /home/taro/.vscode/extensions/ms-vscode.csharp-1.21.9/.omnisharp/1.34.9/omnisharp/OmniSharp.exe
    PID: 4526

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 <27dcabbd1f5d4edeaffe820a1236c676>:0 
  at OmniSharp.Stdio.Driver.Program+<>c__DisplayClass0_0.<Main>b__0 () [0x00006] in <2d02054c9f224f8aa95299738e820ffb>:0 
  at OmniSharp.HostHelpers.Start (System.Func`1[TResult] action) [0x0001c] in <1ed0cdfb5a5d42889b4f5df087ff7bd6>:0 
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).

対策

"omnisharp.useGlobalMono": "never" する:

https://github.com/OmniSharp/omnisharp-vscode/issues/1998#issuecomment-496324258