FAKE build a project with unsafe flag -


i trying build solution 1 of projects needs build unsafe flag on, set correctly in project when building error:

"unsafe code may appear if compiling /unsafe"

this target @ moment target "compileapp" (fun _ -> !! @"***.csproj" |> msbuildrelease builddir "build" |> log "appbuild-output: " )

i tried adding msbuildparams not sure how use them yet (ie there doesnt seem option in msbuildrelease add this

let setparams defaults =     { defaults         verbosity = some(quiet)         targets = ["build"]         properties =             [                 "allowunsafeblocks", "true"                 "configuration", "release"             ]     } 

also best option here create 2 different targets projects safe , unsafe code, of there better way?

i found allowunsafeblocks=true element defined under debug|anycpu , release|anycpu propertygroups in project file.

using fixed me:

target "buildapp" (fun _ ->     !! ".\**\myapp.*.csproj"     |> msbuild builddir "build" ["configuration", "release"; "platform", "anycpu"]     |> log "appbuild-output: " ) 

hope helps.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -