forki/FAKE — Issue #34: Add additional parameters for msbuild
Author: Slesa
Created: 2012-01-29 11:29:10+00:00
State: open

I added tasks to allow additional parameters for msbuild in MSBuildHelper.fs:

let MSBuildDebugExt outputPath properties targets =
let properties = ("Configuration", "Debug") :: properties;
MSBuild outputPath targets properties

let MSBuildReleaseExt outputPath properties targets =
let properties = ("Configuration", "Release") :: properties;
MSBuild outputPath targets properties

but of course it violates DRY. Any better solutions?

I use it to call WiX-Projects with version numbers:

Target "Deploy" (fun _ ->
let deployReferences = !! @"Setup\**\*.wixproj"
MSBuildReleaseExt deployDir ["Version", buildVersion] "Build" deployReferences
|> Log "DeployBuildOutput: "
)