diff options
Diffstat (limited to 'src/WixToolset.Core.Native/WixNativeExe.cs')
-rw-r--r-- | src/WixToolset.Core.Native/WixNativeExe.cs | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/src/WixToolset.Core.Native/WixNativeExe.cs b/src/WixToolset.Core.Native/WixNativeExe.cs index 3bd340bc..994fc7ec 100644 --- a/src/WixToolset.Core.Native/WixNativeExe.cs +++ b/src/WixToolset.Core.Native/WixNativeExe.cs | |||
@@ -12,7 +12,6 @@ namespace WixToolset.Core.Native | |||
12 | internal class WixNativeExe | 12 | internal class WixNativeExe |
13 | { | 13 | { |
14 | private const int FiveMinutesInMilliseconds = 300000; | 14 | private const int FiveMinutesInMilliseconds = 300000; |
15 | private static readonly object PathToWixNativeExeLock = new object(); | ||
16 | private static string PathToWixNativeExe; | 15 | private static string PathToWixNativeExe; |
17 | 16 | ||
18 | private readonly string commandLine; | 17 | private readonly string commandLine; |
@@ -83,24 +82,16 @@ namespace WixToolset.Core.Native | |||
83 | 82 | ||
84 | private static void EnsurePathToWixNativeExeSet() | 83 | private static void EnsurePathToWixNativeExeSet() |
85 | { | 84 | { |
86 | lock (PathToWixNativeExeLock) | 85 | if (String.IsNullOrEmpty(PathToWixNativeExe)) |
87 | { | 86 | { |
88 | if (String.IsNullOrEmpty(PathToWixNativeExe)) | 87 | var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe"); |
89 | { | ||
90 | var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"x86\wixnative.x86.exe"); | ||
91 | |||
92 | if (!File.Exists(path)) | ||
93 | { | ||
94 | path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe"); | ||
95 | 88 | ||
96 | if (!File.Exists(path)) | 89 | if (!File.Exists(path)) |
97 | { | 90 | { |
98 | throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path); | 91 | throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path); |
99 | } | ||
100 | } | ||
101 | |||
102 | PathToWixNativeExe = path; | ||
103 | } | 92 | } |
93 | |||
94 | PathToWixNativeExe = path; | ||
104 | } | 95 | } |
105 | } | 96 | } |
106 | 97 | ||