Matching string in F# FAKE build file -


i have f# fake build file want call parameter conf can have 2 values, cs , sk. batch file looks this

@echo off cls "tools\nuget\nuget.exe" "install" "fake" "-outputdirectory" "tools" "-excludeversion" "tools\fake\tools\fake.exe" build.fsx conf=sk pause 

in f# file, parameter using environvar "conf" , works ok.

now want create helper methof in f# file matches conf parameters , returns string (build configuration value in case), have

let getconfiguration conf =    if (conf=="cs") "release"    else "release(sk)" 

i strange message

build.fsx(29,71): error fs0001: type 'string' not support operator '==' 

this how use method

target "build" (fun _ ->     !! @"**/*.csproj"       |> msbuild builddir "build" ["configuration",(getconfiguration (environvar "conf"))]       |> log "appbuild-output: " ) 

the f# equality operator =.

i don't know fake or whether approach work, reason compiler error that, error message states, there no == operator. valid version:

    if conf = "cs" "release" else "release(sk)" 

see e.g. symbol , operator reference in msdn.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -