diff --git a/build.template b/build.template
index 300d7d8..6efdcd5 100644
--- a/build.template
+++ b/build.template
@@ -3,7 +3,6 @@
// --------------------------------------------------------------------------------------
#r @"packages/FAKE/tools/FakeLib.dll"
-
open Fake
open Fake.Git
open Fake.AssemblyInfoFile
@@ -100,6 +99,15 @@ Target "AssemblyInfo" (fun _ ->
csProjs |> Seq.iter genCSAssemblyInfo
)
+// Copies binaries from default VS location to exepcted bin folder
+// But keeps a subdirectory structure for each project in the
+// src folder to support multiple project outputs
+Target "CopyBinaries" (fun _ ->
+ !! "src/**/*.??proj"
+ |> Seq.map (fun f -> ((System.IO.Path.GetDirectoryName f) @@ "bin/Release", "bin" @@ (System.IO.Path.GetFileNameWithoutExtension f)))
+ |> Seq.iter (fun (fromDir, toDir) -> CopyDir toDir fromDir (fun _ -> true))
+)
+
// --------------------------------------------------------------------------------------
// Clean build results
@@ -333,6 +341,7 @@ Target "All" DoNothing
"Clean"
==> "AssemblyInfo"
==> "Build"
+ ==> "CopyBinaries"
==> "RunTests"
=?> ("GenerateReferenceDocs",isLocalBuild)
=?> ("GenerateDocs",isLocalBuild)
diff --git a/docs/tools/generate.template b/docs/tools/generate.template
index aeb568d..a3e1e90 100644
--- a/docs/tools/generate.template
+++ b/docs/tools/generate.template
@@ -3,8 +3,6 @@
// (the generated documentation is stored in the 'docs/output' directory)
// --------------------------------------------------------------------------------------
-// Binaries that have XML documentation (in a corresponding generated XML file)
-let referenceBinaries = [ "##ProjectName##.dll" ]
// Web site location for the generated documentation
let website = "/##ProjectName##"
@@ -86,19 +84,28 @@ let references =
|> Some
else None
+let binaries =
+ directoryInfo bin
+ |> subDirectories
+ |> Array.map (fun d -> d.FullName @@ (sprintf "%s.dll" d.Name))
+ |> List.ofArray
+
+let libDirs =
+ directoryInfo bin
+ |> subDirectories
+ |> Array.map (fun d -> d.FullName)
+ |> List.ofArray
+
// Build API reference from XML comments
let buildReference () =
CleanDir (output @@ "reference")
- let binaries =
- referenceBinaries
- |> List.map (fun lib-> bin @@ lib)
MetadataFormat.Generate
( binaries, output @@ "reference", layoutRootsAll.["en"],
parameters = ("root", root)::info,
sourceRepo = githubLink @@ "tree/master",
sourceFolder = __SOURCE_DIRECTORY__ @@ ".." @@ "..",
- publicOnly = true, libDirs = [bin],
- ?assemblyReferences = references )
+ ?assemblyReferences = references,
+ publicOnly = true,libDirs = libDirs )
// Build documentation from `fsx` and `md` files in `docs/content`
let buildDocumentation () =
diff --git a/paket.dependencies b/paket.dependencies
index d888131..712fd08 100644
--- a/paket.dependencies
+++ b/paket.dependencies
@@ -6,4 +6,4 @@ nuget NUnit.Runners
nuget FAKE
nuget SourceLink.Fake
-github fsharp/FAKE modules/Octokit/Octokit.fsx
\ No newline at end of file
+github fsharp/FAKE modules/Octokit/Octokit.fsx
diff --git a/src/FSharp.ProjectTemplate/FSharp.ProjectTemplate.fsproj b/src/FSharp.ProjectTemplate/FSharp.ProjectTemplate.fsproj
index f767830..b8f62fa 100644
--- a/src/FSharp.ProjectTemplate/FSharp.ProjectTemplate.fsproj
+++ b/src/FSharp.ProjectTemplate/FSharp.ProjectTemplate.fsproj
@@ -19,19 +19,19 @@
full
false
false
- ..\..\bin
+ .\bin\Debug
DEBUG;TRACE
3
- ..\..\bin\FSharp.ProjectTemplate.xml
+ .\bin\Debug\FSharp.ProjectTemplate.xml
pdbonly
true
true
- ..\..\bin
+ .\bin\Release
TRACE
3
- ..\..\bin\FSharp.ProjectTemplate.xml
+ .\bin\Release\FSharp.ProjectTemplate.xml
@@ -72,4 +72,4 @@
-->
-
\ No newline at end of file
+