[xbuild] Use the env var $MSBuildExtensionsPath before trying other paths.
authorAnkit Jain <radical@corewars.org>
Tue, 22 Feb 2011 15:52:38 +0000 (21:22 +0530)
committerAnkit Jain <radical@corewars.org>
Tue, 22 Feb 2011 16:05:59 +0000 (21:35 +0530)
Change the order of the "search paths", so that the environment
variable can always override it.
Update the man page to reflect the change.

man/xbuild.1
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs

index dd602113705b988b241376b3044f474128883985..2320a37fa72ccb9def530b5a5fd1341a2f180e91 100644 (file)
@@ -73,8 +73,8 @@ to $prefix/lib/mono/xbuild . When used in Import, like:
 
 xbuild tries various values for the msbuild property $(MSBuildExtensionsPath), in order:
 
-  1. /Library/Frameworks/Mono.framework/External/xbuild on Mac OSX.
-  2. Paths specified in the environment variable $MSBuildExtensionsPath.
+  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)
 
index e77209c2caa5802d9149770f7f9b9a7d275f3bcd..9088babcfecf8444dc178ef46234374432af271f 100644 (file)
@@ -120,10 +120,10 @@ namespace Microsoft.Build.BuildEngine {
 
                        string envvar = Environment.GetEnvironmentVariable (property_name);
                        envvar = String.Join (":", new string [] {
+                                               (envvar ?? String.Empty),
                                                // For mac osx, look in the 'External' dir on macosx,
                                                // see bug #663180
                                                MSBuildUtils.RunningOnMac ? MacOSXExternalXBuildDir : String.Empty,
-                                               (envvar ?? String.Empty),
                                                DotConfigExtensionsPath});
 
                        string [] paths = envvar.Split (new char [] {':'}, StringSplitOptions.RemoveEmptyEntries);