anchor.diff:      tidyUpTextFileFromMarkdown("#{deploy_path}/README.txt")
       tidyUpTextFileFromMarkdown("#{deploy_path}/acknowledgements.txt")
       *)
  -)
   
  -Target "NuGet" (fun _ -> 
  -    let workingDir = outputBasePath @@ "package"
  -    targets
  -    |> List.map (fun x -> workingDir @@ "lib" @@ x.ToLower())
  -    |> List.iter CreateDir
  -    let z = CopyFiles
  -    CopyFile net35binariesDir net35binary
  -    CopyFile net40binariesDir net40binary
  +Target "NuGet" <| fun _ -> 
  +    let nugetPath = outputBasePath @@ "nuget"
  +    let workingDir = nugetPath @@ version
  +    CreateDir workingDir
  +    cp_r deployPath workingDir
  +
       NuGet (fun p -> 
  -        { p with OutputPath = outputBasePath
  +        { p with OutputPath = nugetPath
                    WorkingDir = workingDir
                    Version = version
  -                 ReleaseNotes = toLines releaseNotes.Notes }) "Build/NSubstitute.nuspec")
  +                 ReleaseNotes = toLines releaseNotes.Notes }) "Build/NSubstitute.nuspec"
   
  -// TODO: this is crazy hideous
  -Target "Zip" (fun _ -> 
  -    // porting markdown files as-is
  -    CopyFile (workingDir + "acknowledgements.txt") "acknowledgements.markdown"
  -    CopyFile workingDir "BreakingChanges.txt"
  -    CopyFile workingDir "ChangeLog.txt"
  -    CopyFile workingDir "LICENSE.txt"
  -    CopyFile (workingDir + "README.txt") "README.markdown"
  -    CreateDir net35binariesDir
  -    CreateDir net40binariesDir
  -    CopyFile net35binariesDir net35binary
  -    CopyFile net40binariesDir net40binary
  -    let outputZip = (outputBasePath + "NSubstitute." + version + ".zip")
  -    !!(workingDir + "/**/*.*") -- "*.zip"
  -    |> Zip workingDir outputZip)
  +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..."
  
positive.code:     ==> "Package"
      ==> "NuGet"
      ==> "Zip" 
      ==> "Documentation"
      ==> "CodeFromDocumentation"
      ==> "Release"
  RunTargetOrDefault "Default"
  
negative.code:     | s -> s.Split([| ',' |], StringSplitOptions.RemoveEmptyEntries) |> Array.toList
  
  let OUTPUT_PATH = "Output"
  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 _ ->
      CreateCSharpAssemblyInfo "Source/NSubstitute/Properties/AssemblyInfo.cs"
          [ Attribute.Title "NSubstitute"
            Attribute.Description "A simple substitute for .NET mocking libraries." 
  