anchor.diff:  
   /// Traces an error (in red)
   let traceError error = 
  -  match traceMode with
  -  | Console -> logColored true ConsoleColor.Red true error
  -  | Xml     ->  
  -     appendXML "<failure><builderror>"
  -     xmlMessage error
  -     appendXML "</builderror></failure>"
  +    match traceMode with
  +    | Console -> logColored true ConsoleColor.Red true error
  +    | Xml     -> 
  +        { defaultMessage with 
  +            Text = sprintf "<failure><builderror><message level=\"Error\"><![CDATA[%s]]></message></builderror></failure>" error }
  +          |> buffer.Post
     
   
   /// Traces the EnvironmentVariables
   let TraceEnvironmentVariables() = 
  -  [ EnvironTarget.Machine; 
  -    EnvironTarget.Process;
  -    EnvironTarget.User]
  +    [ EnvironTarget.Machine; 
  +      EnvironTarget.Process;
  +      EnvironTarget.User]
       |> List.iter (fun mode ->    
           traceFAKE "Environment-Settings (%A):" mode
           environVars mode |> List.iter (tracefn "  %A"))        
    
   /// Gets the FAKE Version string
  -let fakeVersionStr = 
  -    fakeVersion.ToString()
  -      |> sprintf "FAKE - F# Make - Version %s" 
  +let fakeVersionStr = sprintf "FAKE - F# Make - Version %s" <| fakeVersion.ToString()
   
   /// Traces the begin of the build
   let traceStartBuild _ =
  -  match traceMode with
  -  | Console -> ()
  -  | Xml     ->         
  -      let fi = new FileInfo(xmlOutputFile)
  -      if fi.Exists then
  -        fi.IsReadOnly <- false
  -        fi.Delete()
  -      if not fi.Directory.Exists then fi.Directory.Create()
  +    match traceMode with
  +    | Console -> ()
  +    | Xml     ->         
  +        let fi = new FileInfo(xmlOutputFile)
  +        if fi.Exists then
  +            fi.IsReadOnly <- false
  +            fi.Delete()
  +        if not fi.Directory.Exists then fi.Directory.Create()
           
  -      appendXML "<buildresults>"
  +        buffer.Post { defaultMessage with Text = "<buildresults>" }
   
   /// Traces the end of the build
  -let traceEndBuild _=
  -  match traceMode with
  -  | Console -> ()
  -  | Xml     -> appendXML "</buildresults>"
  +let traceEndBuild _ =
  +    match traceMode with
  +    | Console -> ()
  +    | Xml     -> buffer.Post { defaultMessage with Text = "</buildresults>" }
   
   let openTag tag =  openTags <- tag :: openTags
   
   let closeTag tag =
  -  match openTags with
  -  | x::rest when x = tag -> openTags <- rest
  -  | _ -> failwith "Invalid Tag-structure"
  -  appendXML <| sprintf "</%s>" tag
  +    match openTags with
  +    | x::rest when x = tag -> openTags <- rest
  +    | _ -> failwith "Invalid Tag-structure"
  +
  +    buffer.Post { defaultMessage with Text = sprintf "</%s>" tag }
     
   let closeAllOpenTags() = openTags |> Seq.iter closeTag
   
   /// Traces the begin of a target
   let traceStartTarget name dependencyString =
  -  match traceMode with
  -  | Console -> 
  -      tracefn "Starting Target: %s %s" name dependencyString
  -  | Xml     -> 
  -      openTag "target"
  -      appendXML <| sprintf "<target name=\"%s\">" name
  -      xmlMessage dependencyString
  -
  -  ReportProgressStart <| sprintf "Target: %s" name
  +    match traceMode with
  +    | Console -> tracefn "Starting Target: %s %s" name dependencyString
  +    | Xml     -> 
  +        openTag "target"
  +        buffer.Post { defaultMessage with Text = sprintf "<target name=\"%s\">" name }
  +        xmlMessage dependencyString
  +
  +    ReportProgressStart <| sprintf "Target: %s" name
      
   /// Traces the end of a target   
   let traceEndTarget name =
  -  match traceMode with
  -  | Console -> tracefn "Finished Target: %s" name
  -  | Xml     -> closeTag "target"
  -  ReportProgressFinish <| sprintf "Target: %s" name       
  -  
  +    match traceMode with
  +    | Console -> tracefn "Finished Target: %s" name
  +    | Xml     -> closeTag "target"
  +
  +    ReportProgressFinish <| sprintf "Target: %s" name
     
   /// Traces the begin of a task
   let traceStartTask task description =
  -  match traceMode with
  -  | Console -> ()
  -  | Xml     -> 
  -    openTag "task"
  -    appendXML <| sprintf "<task name=\"%s\">" task
  -  ReportProgressStart <| sprintf "Task: %s %s" task description
  +    match traceMode with
  +    | Console -> ()
  +    | Xml     -> 
  +        openTag "task"
  +        buffer.Post { defaultMessage with Text = sprintf "<task name=\"%s\">" task }
  +
  +    ReportProgressStart <| sprintf "Task: %s %s" task description
      
   /// Traces the end of a task
   let traceEndTask task  description =
  -  match traceMode with
  -  | Console -> ()
  -  | Xml     -> closeTag "task" 
  -  ReportProgressFinish <| sprintf "Task: %s %s" task description       +    match traceMode with
  +    | Console -> ()
  +    | Xml     -> closeTag "task"
  +
  +    ReportProgressFinish <| sprintf "Task: %s %s" task description       
positive.code: let fakePath = productName.GetType().Assembly.Location
         
  /// Gets the FAKE version no.
  let fakeVersion = productName.GetType().Assembly.GetName().Version 
  
  /// logs the specified string to the console
  let logMessageToConsole important newLine s =     
    if important && buildServer <> CCNet then
      if newLine then
        eprintfn "%s" (toRelativePath s)
      else 
        eprintf "%s" (toRelativePath s)
    else
      if newLine then
        printfn "%s" (toRelativePath s)
      else 
        printf "%s" (toRelativePath s)
  
  let xmlMessage message =
      message
        |> sprintf "<message level=\"Info\"><![CDATA[%s]]></message>"
        |> appendXML
      
  /// logs the specified string        
  let logMessage important newLine message =
      match traceMode with
      | Console -> logMessageToConsole important newLine message
      | Xml     -> xmlMessage message
  
  /// Logs the specified string        
  
negative.code: type TraceMode =
  | Console
  | Xml
  
  type Message = 
      { Text      : string
        Color     : ConsoleColor
        Newline   : bool
        Important : bool}
  
  let private defaultMessage = 
      { Text      = ""
        Color     = ConsoleColor.White
        Newline   = true
        Important = false }
  
  /// Logs the specified string to the console
  let private logMessageToConsole important newLine s =     
      if important && buildServer <> CCNet then
          if newLine then
              eprintfn "%s" (toRelativePath s)
          else 
              eprintf "%s" (toRelativePath s)
      else
          if newLine then
              printfn "%s" (toRelativePath s)
          else 
              printf "%s" (toRelativePath s)
  
  let private appendXML line = AppendToFile xmlOutputFile [line]
  
  /// The actual trace mode.
  let mutable traceMode = 
      match buildServer with
      | TeamCity   -> Console
      | CCNet      -> Xml
      | LocalBuild -> Console    
  
  /// Trace verbose output
  let mutable verbose = hasBuildParam "verbose"
  