gpt4 book ai didi

f# - 假: How to define MSBuild properties?

转载 作者:行者123 更新时间:2023-12-04 03:50:13 24 4
gpt4 key购买 nike

我想从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: "
)

如何指定所需的属性?

最佳答案

如果查看source code,您会看到MSBuildRelease只是具有某些预定义属性的MSBuild的快捷方式。如果您需要定义其他属性,除了“Configuration”之外,您可以使用MSBuild:

Target "Build" (fun _ ->
!! solutionFile
|> MSBuild binDir "Build"
[
"Configuration", "Release"
"Platform", "AnyCPU"
"DeployOnBuild", "True"
"DeployTarget", "Package"
"OutFolder", "/what/ever"
]
|> Log "Build-Output: "
)

关于f# - 假: How to define MSBuild properties?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34003614/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com