anchor.diff:  =========================
   *)
   """
  -    let targetDir = "docs/content" @@ lang
  -    let targetFile = targetDir @@ "index.fsx"
  -    ensureDirectory targetDir
  -    System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang))
  +  let targetDir = "docs/content" @@ lang
  +  let targetFile = targetDir @@ "index.fsx"
  +  ensureDirectory targetDir
  +  System.IO.File.WriteAllText(targetFile, System.String.Format(content, lang))
   
   Target "AddLangDocs" (fun _ ->
  -    let args = System.Environment.GetCommandLineArgs()
  -    if args.Length < 4 then
  -        failwith "Language not specified."
  -
  -    args.[3..]
  -    |> Seq.iter (fun lang ->
  -        if lang.Length <> 2 && lang.Length <> 3 then
  -            failwithf "Language must be 2 or 3 characters (ex. 'de', 'fr', 'ja', 'gsw', etc.): %s" lang
  -
  -        let templateFileName = "template.cshtml"
  -        let templateDir = "docs/tools/templates"
  -        let langTemplateDir = templateDir @@ lang
  -        let langTemplateFileName = langTemplateDir @@ templateFileName
  -
  -        if System.IO.File.Exists(langTemplateFileName) then
  -            failwithf "Documents for specified language '%s' have already been added." lang
  -
  -        ensureDirectory langTemplateDir
  -        Copy langTemplateDir [ templateDir @@ templateFileName ]
  -
  -        createIndexFsx lang)
  +  let args = System.Environment.GetCommandLineArgs()
  +  if args.Length < 4 then
  +    failwith "Language not specified."
  +
  +  args.[3..]
  +  |> Seq.iter (fun lang ->
  +      if lang.Length <> 2 && lang.Length <> 3 then
  +        failwithf "Language must be 2 or 3 characters (ex. 'de', 'fr', 'ja', 'gsw', etc.): %s" lang
  +
  +      let templateFileName = "template.cshtml"
  +      let templateDir = "docs/tools/templates"
  +      let langTemplateDir = templateDir @@ lang
  +      let langTemplateFileName = langTemplateDir @@ templateFileName
  +
  +      if System.IO.File.Exists(langTemplateFileName) then
  +        failwithf "Documents for specified language '%s' have already been added." lang
  +
  +      ensureDirectory langTemplateDir
  +      Copy langTemplateDir [ templateDir @@ templateFileName ]
  +
  +      createIndexFsx lang)
   )
   
   Target "ReleaseDocs" (fun _ ->
  -    let tempDocsDir = "temp/gh-pages"
  -    CleanDir tempDocsDir
  -    Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir
  -
  -    CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A"
  -    StageAll tempDocsDir
  -    Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
  -    Branches.push tempDocsDir
  +  let tempDocsDir = "temp/gh-pages"
  +  CleanDir tempDocsDir
  +  Repository.cloneSingleBranch "" (gitHome + "/" + gitName + ".git") "gh-pages" tempDocsDir
  +
  +  CopyRecursive "docs/output" tempDocsDir true |> tracefn "%A"
  +  StageAll tempDocsDir
  +  Git.Commit.Commit tempDocsDir (sprintf "Update generated documentation for version %s" release.NugetVersion)
  +  Branches.push tempDocsDir
   )
   
   #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
   open Octokit
   
   Target "Release" (fun _ ->
  -    StageAll ""
  -    Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
  -    Branches.pushBranch "" "origin" "master"
  -
  -    Branches.tag "" release.NugetVersion
  -    Branches.pushTag "" "origin" release.NugetVersion
  -
  -    // release on github
  -    createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "")
  -    |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
  -    // TODO: |> uploadFile "PATH_TO_FILE"
  -    |> releaseDraft
  -    |> Async.RunSynchronously
  +  StageAll ""
  +  Git.Commit.Commit "" (sprintf "Bump version to %s" release.NugetVersion)
  +  Branches.pushBranch "" "origin" "master"
  +
  +  Branches.tag "" release.NugetVersion
  +  Branches.pushTag "" "origin" release.NugetVersion
  +
  +  // release on github
  +  createClient (getBuildParamOrDefault "github-user" "") (getBuildParamOrDefault "github-pw" "")
  +  |> createDraft gitOwner gitName release.NugetVersion (release.SemVer.PreRelease <> None) release.Notes
  +  // TODO: |> uploadFile "PATH_TO_FILE"
  +  |> releaseDraft
  +  |> Async.RunSynchronously
   )
   
   Target "NETCore" DoNothing
  
positive.code: // the ability to step through the source code of external libraries https://github.com/ctaggart/SourceLink
  
  Target "SourceLink" (fun _ ->
      let baseUrl = sprintf "%s/%s/{0}/%%var2%%" gitRaw project
      !! "src/**/*.??proj"
      |> Seq.iter (fun projFile ->
          let proj = VsProj.LoadRelease projFile
          SourceLink.Index proj.CompilesNotLinked proj.OutputFilePdb __SOURCE_DIRECTORY__ baseUrl
      )
  )
  
  #endif
  
negative.code: )
  
  Target "PublishNuget" (fun _ ->
    Paket.Push(fun p -> { p with WorkingDir = "bin" })
  )
  
  // --------------------------------------------------------------------------------------
  // Generate the documentation
  
  Target "GenerateReferenceDocs" (fun _ ->
    if not <| executeFSIWithArgs "docs/tools" "generate.fsx" ["--define:RELEASE"; "--define:REFERENCE"] [] then
      failwith "generating reference documentation failed"
  )
  
  let generateHelp' fail debug =
    let args =
      if debug then ["--define:HELP"]
      else ["--define:RELEASE"; "--define:HELP"]
    if executeFSIWithArgs "docs/tools" "generate.fsx" args [] then
      traceImportant "Help generated"
    else
      if fail then
        failwith "generating help documentation failed"
      else
        traceImportant "generating help documentation failed"
  
  let generateHelp fail =
    generateHelp' fail false
  
  Target "GenerateHelp" (fun _ ->
    DeleteFile "docs/content/release-notes.md"
    CopyFile "docs/content/" "RELEASE_NOTES.md"
    Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md"
  
    ensureDirectory "docs/files/images"
    CopyFile "docs/files/images/favicon.ico" "paket-files/build/persimmon-projects/Persimmon.Materials/StandardIcons/persimmon.ico"
    CopyFile "docs/files/images/logo.png" "paket-files/build/persimmon-projects/Persimmon.Materials/StandardIcons/persimmon_128.png"
  
    generateHelp true
  )
  
  Target "GenerateHelpDebug" (fun _ ->
    DeleteFile "docs/content/release-notes.md"
    CopyFile "docs/content/" "RELEASE_NOTES.md"
    Rename "docs/content/release-notes.md" "docs/content/RELEASE_NOTES.md"
  
    generateHelp' true true
  )
  
  Target "KeepRunning" (fun _ ->
    use watcher = new FileSystemWatcher(DirectoryInfo("docs/content").FullName,"*.*")
    watcher.EnableRaisingEvents <- true
    watcher.Changed.Add(fun e -> generateHelp false)
    watcher.Created.Add(fun e -> generateHelp false)
    watcher.Renamed.Add(fun e -> generateHelp false)
    watcher.Deleted.Add(fun e -> generateHelp false)
  
    traceImportant "Waiting for help edits. Press any key to stop."
  
    System.Console.ReadKey() |> ignore
  
    watcher.EnableRaisingEvents <- false
    watcher.Dispose()
  )
  
  Target "GenerateDocs" DoNothing
  
  let createIndexFsx lang =
    let content = """(*** hide ***)
  // This block of code is omitted in the generated HTML documentation. Use
  // it to define helpers that you do not want to show in the documentation.
  #I "../../../bin"
  