From 6dfba4f5a6528991b57d3939c8f62ba9de7cd7d5 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 26 Dec 2018 16:11:51 -0800 Subject: Move wixnative.*.exe back to root libs in .nupkg It seems NuGet will not copy the .exes from subfolders so move them back to root folder and live with the warnings that the .exe files are not managed code (because they aren't). --- src/WixToolset.Core.Native/WixNativeExe.cs | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src/WixToolset.Core.Native/WixNativeExe.cs') 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 internal class WixNativeExe { private const int FiveMinutesInMilliseconds = 300000; - private static readonly object PathToWixNativeExeLock = new object(); private static string PathToWixNativeExe; private readonly string commandLine; @@ -83,24 +82,16 @@ namespace WixToolset.Core.Native private static void EnsurePathToWixNativeExeSet() { - lock (PathToWixNativeExeLock) + if (String.IsNullOrEmpty(PathToWixNativeExe)) { - if (String.IsNullOrEmpty(PathToWixNativeExe)) - { - var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), @"x86\wixnative.x86.exe"); - - if (!File.Exists(path)) - { - path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe"); + var path = Path.Combine(Path.GetDirectoryName(new Uri(Assembly.GetExecutingAssembly().CodeBase).LocalPath), "wixnative.x86.exe"); - if (!File.Exists(path)) - { - throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path); - } - } - - PathToWixNativeExe = path; + if (!File.Exists(path)) + { + throw new FileNotFoundException($"Could not find internal piece of WiX Toolset at: {path}", path); } + + PathToWixNativeExe = path; } } -- cgit v1.2.3-55-g6feb