Merge branch 'master' of github.com:mono/mono
[mono.git] / man / xbuild.1
1 .TH "xbuild" 1
2 .SH NAME
3 xbuild \- Mono's tool to build MSBuild project files
4 .SH SYNOPSIS
5 .B xbuild
6 [option] [project-file]
7 .SH DESCRIPTION
8 xbuild can be used to build MSBuild project files. Integrated Development
9 Environments like MonoDevelop and "Microsoft Visual Studio .NET" use msbuild
10 project file format.
11
12 xbuild takes the path of the project or solution file to build, as the main argument.
13 If no file is specified then it tries to build any solution file or project file in
14 the current directory, that has a *proj extension.
15 .SH OPTIONS
16 .TP
17 .B \//target:T1[,TN]
18 List of targets to build
19 .TP
20 .B \//property:Name=Value
21 Set or override project properties
22 .TP
23 .B \//logger:<logger>
24 Custom logger to log build events
25 .TP
26 .B \//toolsversion:version , /tv:version
27 Specify the toolset version to use.
28
29 Eg. /tv:4.0
30     This would cause 4.0 version of the Microsoft.Common.targets (among others) to be used. This overrides
31     the value specified in a project file.
32
33 Valid values: 2.0, 3.0, 3.5 and 4.0
34 .TP
35 .B \//verbosity:<level>
36 Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
37 .TP
38 .B \//validate
39 Validate the project file against the schema
40 .TP
41 .B \//validate:<schema>
42 Validate the project file against the specified schema
43 .TP
44 .B \//consoleloggerparameters:<params>
45 Parameters for the console logger : PerfomanceSummary, NoSummary, NoItemAndPropertyList
46 .TP
47 .B \//nologo
48 Don't show the initial xbuild banner
49 .TP
50 .B \//help
51 Show xbuild usage
52 .TP
53 .B \//version
54 Display xbuild version
55 .SH ENVIRONMENT VARIABLES
56 .TP
57 .I "XBUILD_EMIT_SOLUTION"
58 If this variable is set, then the project file generated from a solution
59 file is emitted.
60 .TP
61 .I "XBUILD_LOG_REFERENCE_RESOLVER"
62 References are resolved by trying a list of assembly search paths ($(AssemblySearchPaths)).
63 If xbuild is unable to resolve a reference, then it logs details of why the various
64 search paths failed. If this variable is set, then it logs the same even for references
65 that were resolved successfully. These logs show up if the verbosity is set to detailed
66 or higher.
67 .TP
68 .I "MSBuildExtensionsPath"
69 MSBuild extensions are usually installed in $(MSBuildExtensionsPath), which xbuild resolves
70 to $prefix/lib/mono/xbuild . When used in Import, like:
71
72   <Import Project="$(MSBuildExtensionsPath)\\TestTargets.targets"/>
73
74 xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
75
76   1. Paths specified in the environment variable $MSBuildExtensionsPath.
77   2. $XDG_CONFIG_HOME/xbuild/tasks (or Environment.SpecialFolder.ApplicationData)
78   3. $prefix/lib/mono/xbuild (default location)
79
80 Anywhere else in the project files, $(MSBuildExtensionsPath) will always resolve to the default
81 location. This is a xbuild-only feature.
82 This is also applicable for the properties $(MSBuildExtensionsPath32) and $(MSBuildExtensionsPath64),
83 and the environment variables have the corresponding names - MSBuildExtensionsPath32/64 .
84 .TP
85 .I "XBUILD_COLORS"
86 If this variable is set, it contains a string of the form
87 "type=foreground,type=.." that specifies which color to use to display
88 errors/warnings etc on some terminals. Type here can be:
89
90 .nf
91         errors, warnings, messages or events
92
93         events: These are project/target/task start and end event
94                 messages.
95 .fi
96
97 .Sp
98 The possible colors for foreground are:
99 .B black, red, brightred, green, brightgreen, yellow, brightyellow,
100 blue, brightblue, magenta, brightmagenta, cyan, brightcyan, grey,
101 white and brightwhite.
102
103 .Sp
104 For example, you could set this variable from your shell:
105 .nf
106         export XBUILD_COLORS
107         XBUILD_COLORS=errors=brightred,warnings=blue
108 .fi
109 .Sp
110
111 You can disable the built-in color scheme by setting this variable to
112 "disable".
113
114 .SH SEE ALSO
115 .BR mono(1), mcs(1)
116 .SH COPYRIGHT
117 Copyright (C) 2009 Novell, Inc (http://www.novell.com)
118 .SH MAILING LISTS
119 Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
120 .SH WEB SITE
121 Visit: http://www.mono-project.com for details