anchor.diff:      // Skip this is this call is a result of updating errors and the content still matches.
       if not (prevContent.ContainsKey(fileName) && prevContent.[fileName] = fileContent ) && Common.supportedExtension(IO.Path.GetExtension(fileName)) then 
         // Trigger parsing in the language service 
  -      let config = IdeApp.Workspace.ActiveConfiguration
         let filePathOpt = 
             // TriggerParse will work only for full paths
             if IO.Path.IsPathRooted(fileName) then 
                 Some(FilePath(fileName) )
  -          elif IdeApp.Workbench.ActiveDocument <> null then
  -             let file = IdeApp.Workbench.ActiveDocument.FileName
  -             if file.FullPath.ToString() <> "" then Some file else None
  -          else None
  +          else 
  +             let doc = IdeApp.Workbench.ActiveDocument 
  +             if doc <> null then 
  +                 let file = doc.FileName
  +                 if file.FullPath.ToString() <> "" then Some file else None
  +             else None
         match filePathOpt with 
         | None -> ()
         | Some filePath -> 
  +        let config = IdeApp.Workspace.ActiveConfiguration
  +        if config <> null then 
             LanguageService.Service.TriggerParse(filePath, fileContent, proj, config, full=false, afterCompleteTypeCheckCallback=(fun (fileName,errors) ->
   
                         let file = fileName.FullPath.ToString()
  
positive.code: ﻿namespace MonoDevelop.FSharp
  
  open System
  open MonoDevelop.Ide
  open MonoDevelop.Ide.Gui
  open MonoDevelop.Core
  
negative.code:                       // Scheule another parse to actually update the errors 
                        try 
                           let doc = IdeApp.Workbench.ActiveDocument
                           if doc <> null && doc.FileName.FullPath.ToString() = file then 
                               Debug.tracef "Parsing" "Requesting re-parse of file '%s' because some errors were reported asynchronously and we should return a new document showing these" file
                               doc.ReparseDocument()
                        with _ -> ()))
  
      // Create parsed document with the results from the last type-checking      
      // (we could wait, but that can take a long time)
      let doc = new FSharpParsedDocument(fileName)
      doc.Flags <- doc.Flags ||| ParsedDocumentFlags.NonSerializable
      let errors = 
  