我想从MSBuild切换到FAKE。在我的MSBuild脚本中,我通过调用具有DeployOnBuild = True和DeployTarget = Package属性的MSBuild来创建Webdeploy包。这将触发webdeploy在构建运行时生成部署包:
<MSBuild Projects="@(ItemToBuild)"
Targets="Build"
Properties="Configuration=$(Configuration);
Platform=$(Platform);
DeployOnBuild=True;
DeployTarget=Package;
OutFolder=$(OutFolder)" />
我怎么能用FAKE做同样的事情?我走到这一步:
Target "Build" (fun _ ->
!! solutionFile
|> MSBuildRelease binDir "Build"
|> Log "Build-Output: "
)
如何指定所需的属性?
答案 0 :(得分:9)
如果查看source code,您会发现MSBuildRelease
只是MSBuild
某些预定义属性的快捷方式。如果您需要定义其他属性,除了&#34;配置&#34;,您可以回到MSBuild
:
Target "Build" (fun _ ->
!! solutionFile
|> MSBuild binDir "Build"
[
"Configuration", "Release"
"Platform", "AnyCPU"
"DeployOnBuild", "True"
"DeployTarget", "Package"
"OutFolder", "/what/ever"
]
|> Log "Build-Output: "
)