From: Ankit Jain Date: Tue, 22 Feb 2011 15:52:38 +0000 (+0530) Subject: [xbuild] Use the env var $MSBuildExtensionsPath before trying other paths. X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=e5fb257d8bf0b3dae7e404a5839b550bee78d685 [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. --- 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);