【问题标题】:F# / FAKE - How to specify `--platform:x64` when invoking MSBuildF# / FAKE - 如何在调用 MSBuild 时指定 `--platform:x64`
【发布时间】:2019-01-10 22:23:15
【问题描述】:

我对 FAKE 很陌生。我使用以下代码(基于官方 FAKE 示例)来构建一些 F# 项目:

Target.create "BuildApp" (fun _ ->
  [ p.buildTarget ]
    |> MSBuild.runRelease id buildDir "Build"
    |> Trace.logItems "AppBuild-Output: "
)

除了它构建一个 32 位应用程序之外,一切都很棒,而我明确需要一个 64 位应用程序(当然是 <gcAllowVeryLargeObjects enabled="true" />),否则它不会产生影响。这个答案:FAKE: How to define MSBuild properties? 似乎引用了 FAKE 4,但看起来我有 FAKE 5。

如何让 FAKE 5 构建 64 位应用程序?非常感谢!

【问题讨论】:

    标签: f# 64-bit f#-fake


    【解决方案1】:

    您可以通过向MSBuild.runRelease 提供id 以外的setParams 函数来设置属性:

    Target.create "BuildApp" (fun _ ->
      [ p.buildTarget ]
        |> MSBuild.runRelease (fun p ->
            { p with Properties = [ "platform", "x64" ] } ) buildDir "Build"
        |> Trace.logItems "AppBuild-Output: "
    

    【讨论】:

      猜你喜欢
      • 2019-01-19
      • 2016-03-04
      • 2017-08-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多