anchor.diff:  module LanguageService =
       module internal Types =
           type PlainNotification= { content: string }
  +
  +        type ConfigValue<'a> =
  +        | UserSpecified of 'a
  +        | Implied of 'a
  +
  +        type [<RequireQualifiedAccess>] FSACTargetRuntime =
  +        | NET
  +        | NetcoreFdd
   
           /// Position in a text document expressed as zero-based line and zero-based character offset.
           /// A position is between two characters like an ‘insert’ cursor in a editor.
  
positive.code:                     "--mode"
                      "lsp"
                  ] |> ResizeArray
              let runOpts = createObj [
                  "command" ==> "dotnet"
                  "args" ==> args
                  "transport" ==> 0
              ]
              let debugOpts = createObj [
                  "command" ==> "dotnet"
                  "args" ==> args
                  "transport" ==> 0
              ]
  
              let options =
                  createObj [
                      "run" ==> runOpts
                      "debug" ==> debugOpts
                  ] |> unbox<ServerOptions>
  
              let fileDeletedWatcher = workspace.createFileSystemWatcher("**/*.{fs,fsx}", true, true, false)
  
              let clientOpts =
                  let opts = createEmpty<Client.LanguageClientOptions>
                  let selector =
                      createObj [
                          "scheme" ==> "file"
                          "language" ==> "fsharp"
                      ] |> unbox<Client.DocumentSelector>
  
                  let initOpts =
                      let backgroundSymbolCache = "FSharp.enableBackgroundSymbolCache" |> Configuration.get false
                      createObj [
                          "AutomaticWorkspaceInit" ==> false
                          "enableBackgroundSymbolCache" ==> backgroundSymbolCache
                      ]
  
                  let synch = createEmpty<Client.SynchronizeOptions>
                  synch.configurationSection <- Some !^"FSharp"
                  synch.fileEvents <- Some( !^ ResizeArray([fileDeletedWatcher]))
  
                  opts.documentSelector <- Some !^selector
                  opts.synchronize <- Some synch
                  opts.revealOutputChannelOn <- Some Client.RevealOutputChannelOn.Never
  
  
                  opts.initializationOptions <- Some !^(Some initOpts)
  
                  opts
  
              let cl = LanguageClient("FSharp", "F#", options, clientOpts, false)
              client <- Some cl
              cl.start () |> c.subscriptions.Add
              return!
                  cl.onReady ()
                  |> Promise.onSuccess (fun _ ->
                      cl.onNotification("fsharp/notifyWorkspace", (fun (a: Types.PlainNotification) ->
                          match Notifications.notifyWorkspaceHandler with
                          | None -> ()
                          | Some cb ->
                              let onMessage res =
                                  match res?Kind |> unbox with
                                  | "project" ->
                                      res |> unbox<ProjectResult> |> deserializeProjectResult |> Choice1Of4 |> cb
                                  | "projectLoading" ->
                                      res |> unbox<ProjectLoadingResult> |> Choice2Of4 |> cb
                                  | "error" ->
                                      res?Data |> parseError |> Choice3Of4 |> cb
                                  | "workspaceLoad" ->
                                      res?Data?Status |> unbox<string> |> Choice4Of4 |> cb
                                  | _ ->
                                      ()
                              let res = a.content |> ofJson<obj>
                              onMessage res
                      ))
                  )
          }
  
      let stop () =
          promise {
              return ()
          }
negative.code:                 return fsacPaths.MSBuild
          }
  
      let private createClient opts =
          let options =
              createObj [
                  "run" ==> opts
                  "debug" ==> opts
                  ] |> unbox<ServerOptions>
  
          let fileDeletedWatcher = workspace.createFileSystemWatcher("**/*.{fs,fsx}", true, true, false)
  
          let clientOpts =
              let opts = createEmpty<Client.LanguageClientOptions>
              let selector =
                  createObj [
                      "scheme" ==> "file"
                      "language" ==> "fsharp"
                  ] |> unbox<Client.DocumentSelector>
  
              let initOpts =
                  let backgroundSymbolCache = "FSharp.enableBackgroundSymbolCache" |> Configuration.get false
                  createObj [
                      "AutomaticWorkspaceInit" ==> false
                      "enableBackgroundSymbolCache" ==> backgroundSymbolCache
                  ]
  
              let synch = createEmpty<Client.SynchronizeOptions>
              synch.configurationSection <- Some !^"FSharp"
              synch.fileEvents <- Some( !^ ResizeArray([fileDeletedWatcher]))
  
              opts.documentSelector <- Some !^selector
              opts.synchronize <- Some synch
              opts.revealOutputChannelOn <- Some Client.RevealOutputChannelOn.Never
  
  
              opts.initializationOptions <- Some !^(Some initOpts)
  
              opts
  
          let cl = LanguageClient("FSharp", "F#", options, clientOpts, false)
          client <- Some cl
          cl
  
      let getOptions () = promise {
          let runtimeSettingsKey = "FSharp.fsacRuntime"
  
          let targetRuntime: Types.ConfigValue<Types.FSACTargetRuntime> =
              let configured = Configuration.tryGet runtimeSettingsKey
  
              match configured with
              | Some "netcore" ->
                  Types.UserSpecified Types.FSACTargetRuntime.NetcoreFdd
              | Some "net" ->
                  Types.UserSpecified Types.FSACTargetRuntime.NET
              | Some v ->
                  Types.Implied Types.FSACTargetRuntime.NetcoreFdd
              | None ->
                  Types.Implied Types.FSACTargetRuntime.NetcoreFdd
  
          let setRuntime runtime =
              let value =
                  match runtime with
                  | Types.FSACTargetRuntime.NET -> "net"
                  | Types.FSACTargetRuntime.NetcoreFdd -> "netcore"
              Configuration.set runtimeSettingsKey value
              |> Promise.bind (fun _ -> vscode.window.showInformationMessage("Please reload your VSCode instance for this change to take effect"))
              |> Promise.map ignore
  
          let suggestNet () =
              promise {
                  let! result = vscode.window.showInformationMessage("Consider using the .NET Framework/Mono language services by setting `FSharp.fsacRuntime` to `net` and installing .NET/Mono as appropriate for your system.", "Use .Net Framework")
                  match result with
                  | "Use .Net Framework" -> do! setRuntime Types.FSACTargetRuntime.NET
                  | _ -> ()
              }
  
          let suggestNetCore () = promise {
              let! result = vscode.window.showInformationMessage("Consider using the .NET Core language services by setting `FSharp.fsacRuntime` to `netcore`", "Use .Net Core")
              match result with
              | "Use .Net Core" -> do! setRuntime Types.FSACTargetRuntime.NetcoreFdd
              | _ -> ()
          }
  
          let monoNotFound () = promise {
              let msg = """
              Cannot start .NET Framework/Mono language services because `mono` was not found.
              Consider:
              * setting the `FSharp.monoPath` settings key to a `mono` binary,
              * including `mono` in your PATH, or
              * installing the .NET Core SDK and using the `FSharp.fsacRuntime` `netcore` language settings
              """
              let! result = vscode.window.showErrorMessage(msg, "Use .Net Core")
              let! _ =
                  match result with
                  | "Use .Net Core" -> setRuntime Types.FSACTargetRuntime.NetcoreFdd
                  | _ -> promise.Return ()
              return failwith "no `mono` binary found"
          }
  
          let dotnetNotFound () = promise {
              let msg = """
              Cannot start .NET Core language services because `dotnet` was not found.
              Consider:
              * setting the `FSharp.dotnetLocation` settings key to a `dotnet` binary,
              * including `dotnet` in your PATH,
              * installing .NET Core into one of the default locations, or
              * using the `net` `FSharp.fsacRuntime` to use mono instead
              """
              let! result = vscode.window.showErrorMessage(msg, "Use .Net Framework")
              let! _ =
                  match result with
                  | "Use .Net Framework" -> setRuntime Types.FSACTargetRuntime.NET
                  | _ -> promise.Return ()
              return failwith "no `dotnet` binary found"
          }
  
          let spawnNetCore dotnet =
              let ionidePluginPath = VSCodeExtension.ionidePluginPath () + "/bin_netcore/fsautocomplete.dll"
              let args =
                  [
  