From 6bb2c3d5a2082c377a31bffe1bbdb950b5e15781 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Wed, 3 Jun 2020 14:01:28 +1000 Subject: Get the inner exception test working in the MSBuild test project. --- src/WixToolset.BuildTasks/ToolsetTask.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/WixToolset.BuildTasks') diff --git a/src/WixToolset.BuildTasks/ToolsetTask.cs b/src/WixToolset.BuildTasks/ToolsetTask.cs index 94d007f0..ae11254a 100644 --- a/src/WixToolset.BuildTasks/ToolsetTask.cs +++ b/src/WixToolset.BuildTasks/ToolsetTask.cs @@ -56,7 +56,19 @@ namespace WixToolset.BuildTasks /// public bool VerboseOutput { get; set; } - private string ToolFullPath => Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe); + private string DefaultToolFullPath => Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe); + + private string ToolFullPath + { + get + { + if (String.IsNullOrEmpty(this.ToolPath)) + { + return this.DefaultToolFullPath; + } + return Path.Combine(this.ToolPath, this.ToolExe); + } + } /// /// Get the path to the executable. @@ -74,9 +86,9 @@ namespace WixToolset.BuildTasks // We need to return a path that exists, so if we're not actually going to run the tool then just return this dll path. return ThisDllPath; } - return this.ToolFullPath; + return this.DefaultToolFullPath; #else - if (IsSelfExecutable(this.ToolFullPath, out var toolFullPath)) + if (IsSelfExecutable(this.DefaultToolFullPath, out var toolFullPath)) { return toolFullPath; } -- cgit v1.2.3-55-g6feb