xbuild(1) | General Commands Manual | xbuild(1) |
xbuild - Mono's tool to build MSBuild project files
xbuild [option] [project-file]
xbuild can be used to build MSBuild project files. Integrated Development Environments like MonoDevelop and "Microsoft Visual Studio .NET" use msbuild project file format.
xbuild takes the path of the project or solution file to build, as the main argument. If no file is specified then it tries to build any solution file or project file in the current directory, that has a *proj extension.
Eg. /tv:4.0
This would cause 4.0 version of the Microsoft.Common.targets (among
others) to be used. This overrides
the value specified in a project file.
Valid values: 2.0, 3.0, 3.5 and 4.0
<Import
Project="$(MSBuildExtensionsPath)\TestTargets.targets"/>
xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
1. Paths specified in the environment variable $MSBuildExtensionsPath.
2. /Library/Frameworks/Mono.framework/External/xbuild on Mac OSX.
3. $XDG_CONFIG_HOME/xbuild/tasks (or
Environment.SpecialFolder.ApplicationData)
4. $prefix/lib/mono/xbuild (default location)
Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default location. This is a xbuild-only feature. This is also applicable for the properties $(MSBuildExtensionsPath32) and $(MSBuildExtensionsPath64), and the environment variables have the corresponding names - MSBuildExtensionsPath32/64 .
Identifier,Version=<version>[,Profile=<profile>]
Eg. ".NETFramework,Version=v4.0"
The 3 parts of the moniker are given by the msbuild properties:
$(TargetFrameworkIdentifier), $(TargetFrameworkVersion) and
$(TargetFrameworkProfile)
This moniker maps to a framework description file on disk:
<framework_root>/Identifier/Version/[Profile]/RedistList/FrameworkList.xml
This file is used to determine the path where to find the framework assemblies for this particular framework.
Framework root here is configurable and is resolved in the following order:
1. Paths specified in the environment variable $XBUILD_FRAMEWORK_FOLDERS_PATH
2. /Library/Frameworks/Mono.framework/External/xbuild-frameworks on Mac OSX.
3. MSBuild property $(TargetFrameworkRoot)
4. $prefix/lib/mono/xbuild-frameworks (default location)
XBuild tries the paths given above, in order, till it finds a FrameworkList.xml for the moniker. Running with /v:detailed or higher verbosity will show the various paths that it tries.
The FrameworkList.xml itself just has a root element like:
<FileList Name=".NET Framework 3.5"
TargetFrameworkDirectory="..\..\..\..\3.5"
IncludeFramework="v3.0">
</FileList>
Here the TargetFrameworkDirectory attribute specifies the directory where the assemblies for this particular framework can be found. If this is not set, then the parent of the folder containing the xml file is taken as the framework directory.
IncludeFramework attribute specifies the version of a framework (under the *same* $(TargetFrameworkIdentifier)) which should be included in the final list of Target framework directories.
errors, warnings, messages or events events: These are project/target/task start and end event messages.
The possible colors for foreground are: black, red, brightred, green, brightgreen, yellow, brightyellow, blue, brightblue, magenta, brightmagenta, cyan, brightcyan, grey, white and brightwhite.
For example, you could set this variable from your shell:
export XBUILD_COLORS XBUILD_COLORS=errors=brightred,warnings=blue
You can disable the built-in color scheme by setting this variable to "disable".
On Mac OSX, for locating pkg-config (.pc) files, xbuild additionally looks in "/Library/Frameworks/Mono.framework/External/pkgconfig" .
Copyright (C) 2011 Novell, Inc (http://www.novell.com)
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
Visit: http://www.mono-project.com for details