anchor.diff:      | s -> s.Split([| ',' |], StringSplitOptions.RemoveEmptyEntries) |> Array.toList
   
   let OUTPUT_PATH = "Output"
  -let outputDir = OUTPUT_PATH @@ buildMode
   let releaseNotes = ReadFile "CHANGELOG.txt" |> ReleaseNotesHelper.parseReleaseNotes
   let version = releaseNotes.AssemblyVersion
  +let outputBasePath = OUTPUT_PATH @@ buildMode
  +let deployPath = outputBasePath @@ "NSubstitute-" + version
   
  -Target "Clean" (fun _ -> CleanDirs [ OUTPUT_PATH ])
  -Target "Version" (fun _ -> 
  +Target "Clean" <| fun _ -> CleanDirs [ OUTPUT_PATH ]
  +
  +Target "Version" <| fun _ ->
       CreateCSharpAssemblyInfo "Source/NSubstitute/Properties/AssemblyInfo.cs"
           [ Attribute.Title "NSubstitute"
             Attribute.Description "A simple substitute for .NET mocking libraries." 
  
positive.code:             info.Arguments <- "\"" + outputBasePath @@ "nsubstitute.github.com" + "\"")
      log ("returned" + result.ToString()))
  
  Target "CodeFromDocumentation" (fun _ -> 
      let outputCodePath = String.Format("{0}/{1}/", OUTPUT_PATH, "CodeFromDocs")
      CreateDir outputCodePath
      // generate samples from docs
      ExamplesToCode.Convert [ "./Source/Docs/"; "./Source/Docs/help/_posts/"; "./" ] outputCodePath
      // compile code samples
      let basePath = (OUTPUT_PATH + "/" + buildMode + "/NET35")
      
      let references = 
          [ for x in [ "NSubstitute.dll"; "nunit.framework.dll" ] -> 
                String.Format("{0}/NSubstitute.Specs/{1}", basePath, x) ]
      CopyFiles outputCodePath references
      CopyFile outputCodePath "./Build/samples.csproj"
      MSBuild null "Build" [ "TargetFrameworkVersion", "v3.5" ] [ outputCodePath + "/samples.csproj" ] |> Log "Build: ")
  
  // empty target to encompass doing everything
  Target "Release" DoNothing
  
  "Clean"
      ==> "Version"
  
negative.code:     tidyUpTextFileFromMarkdown("#{deploy_path}/README.txt")
      tidyUpTextFileFromMarkdown("#{deploy_path}/acknowledgements.txt")
      *)
  
  Target "NuGet" <| fun _ -> 
      let nugetPath = outputBasePath @@ "nuget"
      let workingDir = nugetPath @@ version
      CreateDir workingDir
      cp_r deployPath workingDir
  
      NuGet (fun p -> 
          { p with OutputPath = nugetPath
                   WorkingDir = workingDir
                   Version = version
                   ReleaseNotes = toLines releaseNotes.Notes }) "Build/NSubstitute.nuspec"
  
  Target "Zip" <| fun _ -> 
      let zipPath = outputBasePath @@ "zip"
      CreateDir zipPath
      let outputZip = (zipPath @@ "NSubstitute." + version + ".zip")
      !!(deployPath @@ "**" @@ "*.*") -- "*.zip"
      |> Zip deployPath outputZip
  
  Target "Documentation" (fun _ -> 
      log "building site..."
  