From e5fb257d8bf0b3dae7e404a5839b550bee78d685 Mon Sep 17 00:00:00 2001 From: Ankit Jain Date: Tue, 22 Feb 2011 21:22:38 +0530 Subject: [PATCH] [xbuild] Use the env var $MSBuildExtensionsPath before trying other paths. 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 | 4 ++-- .../Microsoft.Build.BuildEngine/Import.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/man/xbuild.1 b/man/xbuild.1 index dd602113705..2320a37fa72 100644 --- a/man/xbuild.1 +++ b/man/xbuild.1 @@ -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) diff --git a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs index e77209c2caa..9088babcfec 100644 --- a/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs +++ b/mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Import.cs @@ -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); -- 2.25.1