!! "../Mer...">

Easiest way to set verbosity of msbuild statements in fake?

I have a goal that looks like this:

Target "builddotnetcode" (fun _ ->
  !! "../Mercury.sln"
    |> MSBuildRelease null "Clean,Build" 
    |> Log "MercuryBuild - Output: "
)

I just want to establish verbosity somewhere. As far as I can tell from the docs, you need to specify the Verbosity member of the MSBuildParams object. But it buildis the only MSBuildHelper function that provides a way to pass MSBuildParams. Using build, I need to specify the Configuration = Release property, a list of projects and delete the pipeline in Log. It seems like there should be an easier way that doesn't force me to redefine the whole task. Did I miss something?

+4
source share
1 answer

, , . , , - , ,

let loggerConfig : list<MSBuildFileLoggerConfig> = [
  {
    Number = 1
    Filename = Some (baseDir + name + "_build.log")
    Verbosity = Some MSBuildVerbosity.Minimal
    Parameters = Some [MSBuildLogParameter.Append]
  }
]

let setParams defaults =
    { defaults with
        Verbosity = Some MSBuildVerbosity.Minimal
        Targets = ["Build"]
        MaxCpuCount = Some (Some 4)
        FileLoggers = Some loggerConfig
        ToolsVersion = Some "12.0"
        Properties =
          [
            "Optimize", "True"
            "DebugSymbols", "True"
            "Configuration", buildMode
          ]
     }

, msbuild, , msbuilddefaults, .

build setParams solution
  |> DoNothing
+3

All Articles