aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.BuildTasks/ToolsetTask.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.BuildTasks/ToolsetTask.cs')
-rw-r--r--src/WixToolset.BuildTasks/ToolsetTask.cs18
1 files changed, 15 insertions, 3 deletions
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
56 /// </summary> 56 /// </summary>
57 public bool VerboseOutput { get; set; } 57 public bool VerboseOutput { get; set; }
58 58
59 private string ToolFullPath => Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe); 59 private string DefaultToolFullPath => Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe);
60
61 private string ToolFullPath
62 {
63 get
64 {
65 if (String.IsNullOrEmpty(this.ToolPath))
66 {
67 return this.DefaultToolFullPath;
68 }
69 return Path.Combine(this.ToolPath, this.ToolExe);
70 }
71 }
60 72
61 /// <summary> 73 /// <summary>
62 /// Get the path to the executable. 74 /// Get the path to the executable.
@@ -74,9 +86,9 @@ namespace WixToolset.BuildTasks
74 // 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. 86 // 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.
75 return ThisDllPath; 87 return ThisDllPath;
76 } 88 }
77 return this.ToolFullPath; 89 return this.DefaultToolFullPath;
78#else 90#else
79 if (IsSelfExecutable(this.ToolFullPath, out var toolFullPath)) 91 if (IsSelfExecutable(this.DefaultToolFullPath, out var toolFullPath))
80 { 92 {
81 return toolFullPath; 93 return toolFullPath;
82 } 94 }