This is part of the Fake.DotNet.MSBuild module.

MSBuildExe

Functions and values

Function or valueDescription
getAllKnownPaths
Signature: string list
knownMSBuildEntries
Signature: MSBuildEntry list
monoVersionToUseMSBuildOn
Signature: Version

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...

msBuildExe
Signature: string

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.
oldMSBuildLocations
Signature: string list
toDict(items)
Signature: items:seq<MSBuildEntry> -> Map<string,string list>