FAKE - F# Make - A DSL for build tasks and more FAKE
6.0.0

Lookig for older versions of the documentation, pre FAKE v6? See 

v5.fake.build

MSBuild Module

Contains tasks which allow to use MSBuild (or xBuild on Linux/Unix) to build .NET project files or solution files.

Types

Type Description

CliArguments

A type for MSBuild task parameters

Functions and values

Function or value Description

MSBuild.build setParams project

Full Usage: MSBuild.build setParams project

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    project : string - A string with the path to the project file to build.

Runs a MSBuild project

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

project : string

A string with the path to the project file to build.

Example


 open Fake.DotNet
     let buildMode = Environment.environVarOrDefault "buildMode" "Release"
     let setParams (defaults:MSBuildParams) =
             { defaults with
                 Verbosity = Some(Quiet)
                 Targets = ["Build"]
                 Properties =
                     [
                         "Optimize", "True"
                         "DebugSymbols", "True"
                         "Configuration", buildMode
                     ]
              }
     MSBuild.build setParams "./MySolution.sln"

MSBuild.buildWebsite outputPath projectFile

Full Usage: MSBuild.buildWebsite outputPath projectFile

Parameters:
    outputPath : string - The output path.
    projectFile : string - The project file path.

Builds the given web project file with debug configuration and copies it to the given outputPath.

outputPath : string

The output path.

projectFile : string

The project file path.

MSBuild.buildWebsiteConfig setParams outputPath configuration projectFile

Full Usage: MSBuild.buildWebsiteConfig setParams outputPath configuration projectFile

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - The output path.
    configuration : string - MSBuild configuration.
    projectFile : string - The project file path.

Builds the given web project file in the specified configuration and copies it to the given outputPath.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

The output path.

configuration : string

MSBuild configuration.

projectFile : string

The project file path.

MSBuild.buildWebsites outputPath projectFiles

Full Usage: MSBuild.buildWebsites outputPath projectFiles

Parameters:
Returns: seq<string> -> unit

Builds the given web project files with debug configuration and copies them to the given websiteDir.

outputPath : MSBuildParams -> MSBuildParams

The output path.

projectFiles : string

The project file paths.

Returns: seq<string> -> unit

MSBuild.buildWebsitesConfig setParams outputPath configuration projectFiles

Full Usage: MSBuild.buildWebsitesConfig setParams outputPath configuration projectFiles

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - The output path.
    configuration : string - MSBuild configuration.
    projectFiles : seq<string> - The project file paths.

Builds the given web project files in specified configuration and copies them to the given outputPath.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

The output path.

configuration : string

MSBuild configuration.

projectFiles : seq<string>

The project file paths.

MSBuild.buildWithRedirect setParams project

Full Usage: MSBuild.buildWithRedirect setParams project

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    project : string - A string with the path to the project file to build.

Returns: int * List<ConsoleMessage>

Run MSBuild and collect output results and return it.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

project : string

A string with the path to the project file to build.

Returns: int * List<ConsoleMessage>

MSBuild.msBuildExe

Full Usage: MSBuild.msBuildExe

Returns: string

Exposing MSBuild executable

Returns: string

MSBuild.run setParams outputPath targets properties projects

Full Usage: MSBuild.run setParams outputPath targets properties projects

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - If it is null or empty then the project settings are used.
    targets : string - A string with the target names which should be run by MSBuild.
    properties : (string * string) list - A list with tuples of property name and property values.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files or solution files and collects the output files.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

If it is null or empty then the project settings are used.

targets : string

A string with the target names which should be run by MSBuild.

properties : (string * string) list

A list with tuples of property name and property values.

projects : seq<string>

A list of project or solution files.

Returns: string list

MSBuild.runDebug setParams outputPath targets projects

Full Usage: MSBuild.runDebug setParams outputPath targets projects

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - If it is null or empty then the project settings are used.
    targets : string - A string with the target names which should be run by MSBuild.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files or solution files and collects the output files.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

If it is null or empty then the project settings are used.

targets : string

A string with the target names which should be run by MSBuild.

projects : seq<string>

A list of project or solution files.

Returns: string list

MSBuild.runRelease setParams outputPath targets projects

Full Usage: MSBuild.runRelease setParams outputPath targets projects

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - If it is null or empty then the project settings are used.
    targets : string - A string with the target names which should be run by MSBuild.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files or solution files and collects the output files.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

If it is null or empty then the project settings are used.

targets : string

A string with the target names which should be run by MSBuild.

projects : seq<string>

A list of project or solution files.

Returns: string list

MSBuild.runReleaseExt setParams outputPath properties targets projects

Full Usage: MSBuild.runReleaseExt setParams outputPath properties targets projects

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - If it is null or empty then the project settings are used.
    properties : (string * string) list - A list with tuples of property name and property values.
    targets : string - A string with the target names which should be run by MSBuild.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files or solution files in release mode and collects the output files.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

If it is null or empty then the project settings are used.

properties : (string * string) list

A list with tuples of property name and property values.

targets : string

A string with the target names which should be run by MSBuild.

projects : seq<string>

A list of project or solution files.

Returns: string list

MSBuild.runWithDefaults targets projects

Full Usage: MSBuild.runWithDefaults targets projects

Parameters:
    targets : string - A string with the target names which should be run by MSBuild.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files or solution files in release mode to the default outputs.

targets : string

A string with the target names which should be run by MSBuild.

projects : seq<string>

A list of project or solution files.

Returns: string list

MSBuild.runWithProperties setParams outputPath targets properties projects

Full Usage: MSBuild.runWithProperties setParams outputPath targets properties projects

Parameters:
    setParams : MSBuildParams -> MSBuildParams - A function that overwrites the default MSBuildParams
    outputPath : string - If it is null or empty then the project settings are used.
    targets : string - A string with the target names which should be run by MSBuild.
    properties : string -> (string * string) list - A list with tuples of property name and property values.
    projects : seq<string> - A list of project or solution files.

Returns: string list

Builds the given project files and collects the output files.

setParams : MSBuildParams -> MSBuildParams

A function that overwrites the default MSBuildParams

outputPath : string

If it is null or empty then the project settings are used.

targets : string

A string with the target names which should be run by MSBuild.

properties : string -> (string * string) list

A list with tuples of property name and property values.

projects : seq<string>

A list of project or solution files.

Returns: string list