anchor.diff:          lock lockObj <| fun () ->
             file |> Option.iter (fun file ->
               let dir = Path.GetDirectoryName(file)
  -            fsiSession.EvalInteraction(sprintf "System.IO.Directory.SetCurrentDirectory(@\"%s\")" dir)
  -            fsiSession.EvalInteraction(sprintf "#cd @\"%s\"" dir) )
  +            evalInteraction(sprintf "System.IO.Directory.SetCurrentDirectory(@\"%s\")" dir)
  +            evalInteraction(sprintf "#cd @\"%s\"" dir) )
             sbOut.Clear() |> ignore
             sbErr.Clear() |> ignore
             let sbConsole = new Text.StringBuilder()
  
positive.code:             Console.SetOut(new StringWriter(sbConsole))
              let value, itvalue =
                if asExpression then
                    match fsiSession.EvalExpression(text) with
                    | Some value -> Some(value.ReflectionValue, value.ReflectionType), None
                    | None -> None, None
                else
                  fsiSession.EvalInteraction(text)
                  // try get the "it" value, but silently ignore any errors
                  try 
                    match fsiSession.EvalExpression("it") with
                    | Some value -> None, Some(value.ReflectionValue, value.ReflectionType)
                    | None -> None, None
                  with _ -> None, None
  
negative.code:   // Initialize F# Interactive evaluation session
    let sbOut = new Text.StringBuilder()
    let sbErr = new Text.StringBuilder()
    
    let evalInteraction, evalExpression = 
      let inStream = new StringReader("")
      let outStream = new StringWriter(sbOut)
      let errStream = new StringWriter(sbErr)
      let fsiConfig = FsiEvaluationSession.GetDefaultConfiguration(new InteractiveSettings(), false)
      let argv = Array.append [|"C:\\test.exe"; "--quiet"; "--noninteractive"|] (defaultArg options [||])
      let wrap_exception f =
        try
          f()
        with exn -> raise <| new System.Exception(sprintf "FSI failed: \n\tError: %O\n\tOut: %O" errStream outStream, exn)
      let fsiSession = wrap_exception (fun () -> FsiEvaluationSession.Create(fsiConfig, argv, inStream, outStream, errStream))
      let evalInteraction s =
        wrap_exception (fun () -> fsiSession.EvalInteraction(s))
      let evalExpression s =
        wrap_exception (fun () -> fsiSession.EvalExpression(s))
      evalInteraction, evalExpression
    do 
      let fullPath = System.Reflection.Assembly.GetExecutingAssembly().Location
      let dir, fname = Path.GetDirectoryName(fullPath), Path.GetFileName(fullPath)
      evalInteraction("#I @\"" + dir + "\"")
      evalInteraction("#r @\"" + fname + "\"")
      evalInteraction("let fsi = new FSharp.Literate.EvaluatorHelpers.InteractiveSettings()")
  
    let evalFailed = new Event<_>()
    let lockObj = obj()
  