Welcome to mirror list, hosted at ThFree Co, Russian Federation.

xbuild.1 « man - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b1ec1f28531e87bd146b0c224915458b491cb3dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
.TH "xbuild" 1
.SH NAME
xbuild \- Mono's tool to build MSBuild project files
.SH SYNOPSIS
.B xbuild
[option] [project-file]
.SH DESCRIPTION
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.
.SH OPTIONS
.TP
.B \//target:T1[,TN]
List of targets to build
.TP
.B \//property:Name=Value
Set or override project properties
.TP
.B \//logger:<logger>
Custom logger to log build events
.TP
.B \//toolsversion:version , /tv:version
Specify the toolset version to use.

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
.TP
.B \//verbosity:<level>
Logger verbosity level : quiet, minimal, normal, detailed, diagnostic
.TP
.B \//validate
Validate the project file against the schema
.TP
.B \//validate:<schema>
Validate the project file against the specified schema
.TP
.B \//consoleloggerparameters:<params> , /clp:<params>
Parameters for the console logger : PerfomanceSummary, Summary, NoSummary, NoItemAndPropertyList, Verbosity
.TP
.B \//filelogger[n] , /fl[n]
Logs the output to a file, named 'msbuild.log' by default. If the optional number 'n' is
specified, then it logs to 'msbuild[n].log' . Parameters for this logger, including
the log file name can be specified via a corresponding /flp[n] option. Default verbosity
for file loggers is 'detailed. 'n' can be between 1-9.
.TP
.B \//fileloggerparameters[n]:<params> , /flp[n]:<params>
Parameters for a file logger. This implies a corresponding /fl[n]. 'n' can be between
1-9, and is used to add upto 10 file loggers. Parameters can be, besides the ones available
for console logger:
.RS
.TP
.I LogFile=<file>
File to which the build log will be written.
.TP
.I Append
If this is used, then the log file is appended to, else a new one will be created.
.TP
.I Encoding=<encoding>
Encoding to use for the log file, eg. UTF-8, ASCII.
.TP
Eg: xbuild foo.csproj /flp:Verbosity=normal "/flp1:LogFile=build.log;Append;Encoding=ASCII"
.RE
.TP
.B \//nologo
Don't show the initial xbuild banner
.TP
.B \//help
Show xbuild usage
.TP
.B \//version
Display xbuild version
.SH ENVIRONMENT VARIABLES
.TP
.I "XBUILD_EMIT_SOLUTION"
If this variable is set, then the project file generated from a solution
file is emitted.
.TP
.I "XBUILD_LOG_REFERENCE_RESOLVER"
References are resolved by trying a list of assembly search paths ($(AssemblySearchPaths)).
If xbuild is unable to resolve a reference, then it logs details of why the various
search paths failed. If this variable is set, then it logs the same even for references
that were resolved successfully. These logs show up if the verbosity is set to detailed
or higher.
.TP
.I "MSBuildExtensionsPath"
MSBuild extensions are usually installed in $(MSBuildExtensionsPath), which xbuild resolves
to $prefix/lib/mono/xbuild . When used in Import, like:

  <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 .
.TP
.I "XBUILD_FRAMEWORK_FOLDERS_PATH"
With ToolsVersion 4.0, projects can target arbitrary frameworks referenced by TargetFrameworkMoniker,
which is of the format:

  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:

.nf
  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)
.fi

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.

.TP
.I "XBUILD_COLORS"
If this variable is set, it contains a string of the form
"type=foreground,type=.." that specifies which color to use to display
errors/warnings etc on some terminals. Type here can be:

.nf
	errors, warnings, messages or events

	events: These are project/target/task start and end event
	        messages.
.fi

.Sp
The possible colors for foreground are:
.B black, red, brightred, green, brightgreen, yellow, brightyellow,
blue, brightblue, magenta, brightmagenta, cyan, brightcyan, grey,
white and brightwhite.

.Sp
For example, you could set this variable from your shell:
.nf
	export XBUILD_COLORS
	XBUILD_COLORS=errors=brightred,warnings=blue
.fi
.Sp

You can disable the built-in color scheme by setting this variable to
"disable".

.SH NOTES
On Mac OSX, for locating pkg-config (.pc) files, xbuild additionally
looks in "/Library/Frameworks/Mono.framework/External/pkgconfig" .

.SH SEE ALSO
.BR mono(1), mcs(1)
.SH COPYRIGHT
Copyright (C) 2011 Novell, Inc (http://www.novell.com)
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
Visit: http://www.mono-project.com for details