anchor.diff:          |> ignore
   
       let generateFsiReferences() =
  -        getActiveProject()
  -        |> Option.iter (fun project ->
  -            // Generate script files
  -            if isFSharpProject project then
  -                generateReferenceFiles project)
  -
  -    let onBuildDoneHandler = EnvDTE._dispBuildEvents_OnBuildDoneEventHandler (fun _ _ ->
  +        protect (fun _ ->
  +            getActiveProject()
  +            |> Option.iter (fun project ->
  +                // Generate script files
  +                if isFSharpProject project then
  +                    generateReferenceFiles project))
  +
  +    let generateAllFsiReferences() =
  +        protect (fun _ ->
               Logging.logInfo (fun _ -> "Checking projects after build done...")
               let dte = dte2 :?> DTE
               listFSharpProjectsInSolution dte
  
positive.code:             sb.Append("#load ") |> ignore
              let relativePaths = sourceFiles |> Array.map (getRelativePath scriptFolder >> sprintf "\"%s\"")
              sb.AppendLine(String.Join(Environment.NewLine + new String(' ', "#load ".Length), relativePaths)) |> ignore
          sb.ToString()   
  
      let getReferenceAssembliesFolderByVersion (project: Project) =
          Option.attempt (fun _ ->
  
negative.code:         // We use compiler options to ensure that assembly references are resolved in the right order.
          projectProvider.CompilerOptions
          |> Seq.choose (fun x -> if x.StartsWith("-r:") then Some (x.[3..].Trim(' ', '"')) else None)
          |> Seq.choose (fun assemblyPath ->
              let assemblyName = Path.GetFileNameWithoutExtension(assemblyPath)
              if not (blackList.Contains assemblyName) && whiteList.Contains assemblyName then
                  let fullPath = Path.GetFullPathSafe(assemblyPath)
                  if File.Exists fullPath then
  