Skip to content
Oleg edited this page May 29, 2017 · 2 revisions

Cross-platform scripts

Build-in commands/tasks, filesets etc are independent from operating system and should work everywhere.

Use unix style path separators

It's recommended to use unix-style slash separator while defining filesets and rules. Such names are converted to proper windows paths if script is executed on windows.

Use </> operator to combine paths and file names. It's also xplat-friendly.

dotnet compilers

csc and fsc tasks will use .NET SDK and mono depending on runtime the build script are started on. If xake is started like fsharpi build.fsx -- build (fsharpi is mono's F# Interactive command line tool) mono compiler will be used.

Xake also allows using both Mono and .NET frameworks explicitly by defining NETFX variable. NETFX-TARGET script variable allows to specify which runtime libraries to reference and which framework would target the resulting assembly.

dotnet runtime

List of valid targets:

| "net-20" | "net-2.0" | "2.0"
| "net-30" | "net-3.0" | "3.0"
| "net-35" | "net-3.5" | "3.5"
| "net-40c"| "net-4.0c" | "4.0-client"
| "net-40" | "net-4.0" | "4.0"| "4.0-full"
| "net-45" | "net-4.5" | "4.5"| "4.5-full"

| "mono-20" | "mono-2.0" | "2.0"
| "mono-35" | "mono-3.5" | "3.5"
| "mono-40" | "mono-4.0" | "4.0"
| "mono-45" | "mono-4.5" | "4.5"

Use "2.0".."4.5" targets for multi-platform environments (will target mono-XXX being run under mono framework).

Known issues

shell task: it's discovered that working dir, arguments resolution is different under mono. It might require full path to be used.

Clone this wiki locally