anchor.diff:  "BuildApp" <== ["Clean"]
   "Test" <== ["BuildApp"]
   "MergeStructureMap" <== ["Test"]
  -"MergeFlavours"  <== ["MergeStructureMap"]
  -"BuildZip" <== ["MergeFlavours"]
  +"BuildZip" <== ["MergeStructureMap"]
   "ZipDocumentation" <== ["GenerateDocumentation"]
  -"Deploy" <== ["BuildZip"; "ZipDocumentation"; "BuildNuGet"]
  +"BuildNuGetFlavours" <== ["BuildNuGet"]
  +"Deploy" <== ["BuildZip"; "ZipDocumentation"; "BuildNuGetFlavours"]
   "Default" <== ["Deploy"]
   
   // start build
  
positive.code:         |> DeleteFiles
  )
  
  
  Target "MergeFlavours" (fun _ ->
      flavours
        |> Seq.iter (fun (flavour,_) -> 
              let adapter = buildDir + sprintf "Machine.Fakes.Adapters.%s.dll" flavour
  
              ILMerge 
                  (fun p -> 
                      {p with 
                          Libraries = [adapter]
                          AttributeFile = adapter
                          Internalize = InternalizeExcept "ILMergeExcludes.txt"
                          TargetPlatform = sprintf @"v4,%s" targetPlatformDir})
  
                  (buildDir + sprintf "Machine.Fakes.%s.dll" flavour)
                  (buildDir + "Machine.Fakes.dll"))
  )
  
  FinalTarget "DeployTestResults" (fun () ->
      !+ (testOutputDir + "\**\*.*") 
        |> Scan
  
negative.code: )
  
  Target "BuildNuGet" (fun _ ->
      CleanDirs [nugetDir; nugetLibDir; nugetDocsDir]
          
      XCopy docsDir nugetDocsDir
      [buildDir + "Machine.Fakes.dll"]
          |> CopyTo nugetLibDir
  
      NuGet (fun p -> 
          {p with               
              Authors = authors
              Project = projectName
              Description = projectDescription       
              Version = version                        
              OutputPath = nugetDir
              Dependencies = ["Machine.Specifications","0.3.0.0"]
              AccessKey = getBuildParamOrDefault "nugetkey" ""
              Publish = hasBuildParam "nugetkey" })
          "machine.fakes.nuspec"
  
      [nugetDir + sprintf "Machine.Fakes.%s.nupkg" version]
          |> CopyTo deployDir
  )
  
  Target "BuildNuGetFlavours" (fun _ ->
      flavours
        |> Seq.iter (fun (flavour,flavourVersion) ->
              CleanDirs [nugetDir; nugetLibDir; nugetDocsDir]
          
              XCopy docsDir nugetDocsDir
              [buildDir + sprintf "Machine.Fakes.Adapters.%s.dll" flavour]
                |> CopyTo nugetLibDir
  
              NuGet (fun p -> 
  