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 +++++++--------------- .../WixToolset.Core.Native.nuspec | 8 ++++---- 2 files changed, 11 insertions(+), 20 deletions(-) (limited to 'src') 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; } } diff --git a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec index a99c5ec3..195ea7b6 100644 --- a/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec +++ b/src/WixToolset.Core.Native/WixToolset.Core.Native.nuspec @@ -28,9 +28,9 @@ These native executables are included in this .nupkg to place the .exe correctly for tests to work. That are ignored when published. The dependency above is used when publishing the tools. --> - - - - + + + + -- cgit v1.2.3-55-g6feb