[英]FAKE (F# Make) - Is it possible to ignore compiler warnings for a given build target?
[英]Matching string in F# FAKE build file
我有一个F#FAKE构建文件,我想使用参数conf
来调用它,它可以有两个值cs和sk。 我的批处理文件如下所示
@echo off
cls
"tools\nuget\nuget.exe" "install" "FAKE" "-OutputDirectory" "tools" "-ExcludeVersion"
"tools\FAKE\tools\Fake.exe" build.fsx conf=sk
pause
在F#文件中,我使用environVar "conf"
获取参数,并且可以正常工作。
现在,我想在F#文件中创建一个与conf
参数匹配的辅助方法methof并返回一个字符串(在我的情况下为构建配置值),所以我有
let getConfiguration conf =
if (conf=="cs") then "Release"
else "Release(SK)"
我收到一个奇怪的消息
build.fsx(29,71): error FS0001: The type 'string' does not support the operator '=='
这就是我使用方法
Target "Build" (fun _ ->
!! @"**/*.csproj"
|> MSBuild buildDir "Build" ["Configuration",(getConfiguration (environVar "conf"))]
|> Log "AppBuild-Output: "
)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.