Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

OBSOLETE

Use Fake.DotNet.MSBuild instead

MSBuildHelper

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

Nested types and modules

TypeDescription
BuildException
OBSOLETE

Use Fake.DotNet.MSBuild instead

An exception type to signal build errors.

MSBuildDistributedLoggerConfig
OBSOLETE

Use Fake.DotNet.MSBuild instead

MSBuildFileLoggerConfig
OBSOLETE

Use Fake.DotNet.MSBuild instead

A type for MSBuild configuration

MSBuildLogParameter
OBSOLETE

Use Fake.DotNet.MSBuild instead

MSBuild log option

MSBuildParams
OBSOLETE

Use Fake.DotNet.MSBuild instead

A type for MSBuild task parameters

MSBuildProject
OBSOLETE

Use Fake.DotNet.MSBuild instead

A type to represent MSBuild project files.

MSBuildVerbosity
OBSOLETE

Use Fake.DotNet.MSBuild instead

MSBuild verbosity option

MsBuildEntry
OBSOLETE

Use Fake.DotNet.MSBuild instead

Functions and values

Function or valueDescription
build setParams project
Signature: setParams:(MSBuildParams -> MSBuildParams) -> project:string -> unit
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

Runs a MSBuild project

Parameters

  • setParams - A function that overwrites the default MsBuildParams
  • project - A string with the path to the project file to build.

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
let buildMode = getBuildParamOrDefault "buildMode" "Release"
let setParams defaults =
        { defaults with
            Verbosity = Some(Quiet)
            Targets = ["Build"]
            Properties =
                [
                    "Optimize", "True"
                    "DebugSymbols", "True"
                    "Configuration", buildMode
                ]
         }
build setParams "./MySolution.sln"
      |> DoNothing
val buildMode : obj
val setParams : defaults:'a -> 'a
val defaults : 'a
union case Option.Some: Value: 'T -> Option<'T>
BuildWebsite outputPath projectFile
Signature: outputPath:string -> projectFile:string -> unit
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

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

Parameters

  • outputPath - The output path.
  • projectFile - The project file path.
BuildWebsiteConfig(...)
Signature: outputPath:string -> configuration:string -> projectFile:string -> unit
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

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

Parameters

  • outputPath - The output path.
  • configuration - MSBuild configuration.
  • projectFile - The project file path.
BuildWebsites outputPath projectFiles
Signature: outputPath:string -> projectFiles:seq<string> -> unit
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

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

Parameters

  • outputPath - The output path.
  • projectFiles - The project file paths.
BuildWebsitesConfig(...)
Signature: outputPath:string -> configuration:string -> projectFiles:seq<string> -> unit
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

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

Parameters

  • outputPath - The output path.
  • configuration - MSBuild configuration.
  • projectFiles - The project file paths.
getAllKnownPaths
Signature: string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

knownMsBuildEntries
Signature: MsBuildEntry list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

monoVersionToUseMSBuildOn
Signature: Version
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

Versions of Mono prior to this one have faulty implementations of MSBuild NOTE: in System.Version 5.0 >= 5.0.0.0 is false while 5.0.0.0 >= 5.0 is true...

MSBuild(...)
Signature: outputPath:string -> targets:string -> properties:(string * string) list -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.Run instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.Run instead

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

Parameters

  • outputPath - If it is null or empty then the project settings are used.
  • targets - A string with the target names which should be run by MSBuild.
  • properties - A list with tuples of property name and property values.
  • projects - A list of project or solution files.
MSBuildDebug outputPath targets projects
Signature: outputPath:string -> targets:string -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.RunDebug instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.RunDebug instead

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

Parameters

  • outputPath - If it is null or empty then the project settings are used.
  • targets - A string with the target names which should be run by MSBuild.
  • projects - A list of project or solution files.
MSBuildDefaults
Signature: MSBuildParams
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

Defines a default for MSBuild task parameters

msBuildExe
Signature: string
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

Tries to detect the right version of MSBuild. - On all OS's, we check a MSBuild environment variable which is either a direct path to a file to use, or a directory that contains a file called msbuild on non-Windows systems with mono >= 5.0.0.0, or xbuild on non-Windows systems with mono < 5.0.0.0, * `MSBuild.exe` on Windows systems, or * a tool that exists on the current PATH - In addition, on non-Windows systems we check the current PATH for the following binaries, in this order: * Mono >= 5.0.0.0: msbuild, xbuild Mono < 5.0.0.0: xbuild, msbuild This is due to several known issues in the Mono < 5.0 implementation of MSBuild. - In addition, on Windows systems we try to read the MSBuild tool location from the AppSettings file using a parameter named MSBuild, and finally if a VisualStudioVersion environment variable is specified, we try to use the specific MSBuild version, matching that Visual Studio version.

MSBuildLoggers
Signature: string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

Defines the loggers to use for MSBuild task

MSBuildRelease(...)
Signature: outputPath:string -> targets:string -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.RunRelease instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.RunRelease instead

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

Parameters

  • outputPath - If it is null or empty then the project settings are used.
  • targets - A string with the target names which should be run by MSBuild.
  • projects - A list of project or solution files.
MSBuildReleaseExt(...)
Signature: outputPath:string -> properties:(string * string) list -> targets:string -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.RunReleaseExt instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.RunReleaseExt instead

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

Parameters

  • outputPath - If it is null or empty then the project settings are used.
  • properties - A list with tuples of property name and property values.
  • targets - A string with the target names which should be run by MSBuild.
  • projects - A list of project or solution files.
MSBuildWithDefaults targets projects
Signature: targets:string -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.RunWithDefaults instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.RunWithDefaults instead

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

Parameters

  • targets - A string with the target names which should be run by MSBuild.
  • projects - A list of project or solution files.
MSBuildWithProjectProperties(...)
Signature: outputPath:string -> targets:string -> properties:(string -> (string * string) list) -> projects:seq<string> -> string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild.RunWithProjectProperties instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild.RunWithProjectProperties instead

Builds the given project files and collects the output files.

Parameters

  • outputPath - If it is null or empty then the project settings are used.
  • targets - A string with the target names which should be run by MSBuild.
  • properties - A list with tuples of property name and property values.
  • projects - A list of project or solution files.
oldMsBuildLocations
Signature: string list
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

pathToLogger
Signature: string
serializeArgs(args)
Signature: args:seq<(string * string) option> -> string
toDict(items)
Signature: items:seq<MsBuildEntry> -> Map<string,string list>
Attributes:
[<Obsolete("Use Fake.DotNet.MSBuild instead")>]
OBSOLETE

Use Fake.DotNet.MSBuild instead

unescapeMSBuildSpecialChars(s)
Signature: s:string -> string