[xbuild] Use the env var $MSBuildExtensionsPath before trying other paths.
[mono.git] / man / xbuild.1
index 5dfca3f40e976fc5bf558d04d9f61aec11e4b9a3..2320a37fa72ccb9def530b5a5fd1341a2f180e91 100644 (file)
@@ -10,8 +10,8 @@ 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 project file in the current
-directory, that has a *proj extension.
+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]
@@ -23,6 +23,15 @@ Set or override project properties
 .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
@@ -33,7 +42,7 @@ Validate the project file against the schema
 Validate the project file against the specified schema
 .TP
 .B \//consoleloggerparameters:<params>
-Parameters for the console logger
+Parameters for the console logger : PerfomanceSummary, NoSummary, NoItemAndPropertyList
 .TP
 .B \//nologo
 Don't show the initial xbuild banner
@@ -43,6 +52,70 @@ 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_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