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:         // 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
  
negative.code:         String.Join(Environment.NewLine, header, String.Join(Environment.NewLine, refLines))
  
      let getExistingFileRefs project fileName = 
          let filePath = getFullFilePathInScriptFolder project fileName
          if File.Exists filePath then
              File.ReadLines filePath
              |> Seq.filter (fun (line: string) -> line.StartsWith "#r")
  