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:     
      let ConvertFile file targetDir = 
          let fileName = Path.GetFileNameWithoutExtension(file)
          let target = (String.Format("{0}{1}.cs", targetDir, fileName))
          log (String.Format("Converting {0} to {1}", file, target))
          TransformFile file target (ExtractDocs.strToFixture fileName)
      
      let Convert paths targetDir = 
          let paths = paths |> Seq.toList
          for p in paths do
              trace (String.Format("Convert from {0} to {1}", p, targetDir))
              let mdFiles = !!(p + "*.markdown") |> Seq.toList
              let htmlFiles = !!(p + "*.html") |> Seq.toList
              for file in List.append mdFiles htmlFiles do
                  ConvertFile file targetDir
  
  let ALL_TARGETS = [ "NET35"; "NET40"; "NET45" ]
  
negative.code:           Attribute.Product "NSubstitute" 
            Attribute.Copyright @"Copyright \u00A9 2009 NSubstitute Team"
            Attribute.Version version
            Attribute.FileVersion version ]
  
  Target "BuildSolution" <| fun _ -> 
      let build config mode = 
          MSBuild null "Build"
              [ "Configuration", config + "-" + buildMode ] // e.g. NET35-Debug
              [ "./Source/NSubstitute.2010.sln" ]
              |> ignore
      targets |> List.iter (fun config -> build config buildMode)
  
  Target "Test" <| fun _ -> 
      targets
      |> List.iter (fun config -> 
                     let workingDir = outputBasePath @@ config
                     let testDlls = !!(workingDir @@ "**" @@ "*Specs.dll")
                     testDlls |> NUnit(fun p -> 
                                     { p with DisableShadowCopy = true
                                              Framework = "net-4.0"
                                              ExcludeCategory = "Pending"
                                              OutputFile = workingDir @@ "TestResults.xml" })
                     )
  
  Target "Default" DoNothing
  
  Target "Package" <| fun _ -> 
      targets
      |> List.map (fun x -> x, deployPath @@ "lib" @@ x.ToLower())
      |> List.iter (fun (target, path) -> 
  