anchor.diff:  )
   
   Target "Build" (fun _ ->
  -//    !! "SourceLink.sln" |> MSBuildRelease "" "Rebuild" |> ignore
  -    MSBuildHelper.build  (fun p ->
  -    { p with
  -        Targets = ["Rebuild"]
  -        Properties = ["Configuration","Release"]
  -//      NoConsoleLogger = true
  -    }) "SourceLink.sln"
  +    !! "SourceLink.sln" |> MSBuildRelease "" "Rebuild" |> ignore
   )
   
   Target "SourceLink" (fun _ ->
  
positive.code: #I "packages/FAKE/tools"
  #r "FakeLib.dll"
  #load "packages/SourceLink.Fake/tools/SourceLink.Tfs.fsx"
  
  open System
  open System.IO
  open Fake
  open Fake.AssemblyInfoFile
  open SourceLink
  
  
  open Microsoft.TeamFoundation.Build.Client
  
  let rec printBuildInfo (bi:IBuildInformation) indent =
      bi.Nodes |> Seq.iter (fun n ->
          printfn "%s%d %s" indent n.Id n.Type
          for k,v in n.Fields.KeyValues do
              printfn "%s  %-30s %s" indent k v
          printBuildInfo n.Children (indent + "  ")
      )
  
  //// print current buid info
  //let tp = new TfsProject(Uri "https://ctaggart.visualstudio.com/DefaultCollection/TryGit")
  ////tp.Tfs.BuildServer.GetBuildDefinitions
  ////tp.GetBuildDefinitions()
  //let b = tp.Tfs.BuildServer.GetBuild 364
  //let bi = b.Information
  //printBuildInfo bi ""
  //
  //let st = bi.AddBuildStep("build step a", "message of build step a", DateTime.UtcNow, BuildStepStatus.Succeeded)
  //st.FinishTime <- st.StartTime.AddMinutes 2.
  //bi.Save()
  
  open System.Collections.Generic
  
  //[<AllowNullLiteral>]
  type MyListener(root:IBuildInformation) =
      let defaultTarget = root.AddBuildStep("no target", "no target", DateTime.UtcNow, BuildStepStatus.Unknown)
      let mutable target = defaultTarget
      interface ITraceListener with
          member x.Write msg =
              match msg with
              | OpenTag(tag,name) ->
                  if tag.Equals "target" then
                      target <- root.AddBuildStep(name, name, DateTime.UtcNow, BuildStepStatus.Unknown)
              | StartMessage -> ()
              | ImportantMessage text ->
                  target.Node.Children.AddBuildMessage(text, BuildMessageImportance.High, DateTime.UtcNow) |> ignore
              | LogMessage(text,newLine) ->
                  target.Node.Children.AddBuildMessage(text, BuildMessageImportance.Normal, DateTime.UtcNow) |> ignore
              | TraceMessage(text,newLine) ->
                  target.Node.Children.AddBuildMessage(text, BuildMessageImportance.Low, DateTime.UtcNow) |> ignore
              | ErrorMessage text -> 
                  target.Node.Children.AddBuildError(text, DateTime.UtcNow) |> ignore
              | FinishedMessage -> ()
              | CloseTag tag ->
                  if tag.Equals "target" then
                      target.FinishTime <- DateTime.UtcNow
                      target <- defaultTarget
  //                    root.Save()
      member x.Save() = root.Save()
  
  //listeners.Clear()
  //listeners.Add(MyListener())
  //MSBuildLoggers <- []
  
  let dt = DateTime.UtcNow
  let cfg = getBuildConfig __SOURCE_DIRECTORY__
  
negative.code:     }) "Git/Git.nuspec"
  )
  
  "Clean"
      =?> ("BuildVersion", buildServer = BuildServer.AppVeyor)
      ==> "AssemblyInfo"
      ==> "Build"
      =?> ("SourceLink", isMono = false && hasBuildParam "link")
      ==> "NuGet"
  
  RunTargetOrDefault "NuGet"