From 4310916863735f641d2aa2e3f44d47c7b08c9d49 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 14 Feb 2022 13:39:03 -0800 Subject: Fix the bitness of native binaries for .NET Framework First, moved the tests build into a separate directory to prevent collisions with shipping code. That requires each test to copy in the required native binaries. Default the native binaries to x64 for testing since we've standardized on VS2022 which is all x64 all the time. Finally, copy the native binaries into the .NET Framework differently from .NET Core because .NET Framework does not support cross-platform thus requires a different layout. --- .../WixToolset.Core.Native.csproj | 7 ------- src/wix/test/Directory.Build.props | 10 ++++++++++ .../WixToolsetTest.BuildTasks.csproj | 8 +++++++- .../WixToolsetTest.Core.Native.csproj | 6 ++++++ .../WixToolsetTest.CoreIntegration.csproj | 6 ++++++ .../test/WixToolsetTest.Sdk/MsbuildUtilities.cs | 2 +- .../WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj | 6 ++++++ src/wix/wix.sln | 8 ++++---- src/wix/wix/wix.csproj | 23 +++++++++++++++------- 9 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 src/wix/test/Directory.Build.props diff --git a/src/wix/WixToolset.Core.Native/WixToolset.Core.Native.csproj b/src/wix/WixToolset.Core.Native/WixToolset.Core.Native.csproj index 5a916f27..74132155 100644 --- a/src/wix/WixToolset.Core.Native/WixToolset.Core.Native.csproj +++ b/src/wix/WixToolset.Core.Native/WixToolset.Core.Native.csproj @@ -24,13 +24,6 @@ - - - - - - - diff --git a/src/wix/test/Directory.Build.props b/src/wix/test/Directory.Build.props new file mode 100644 index 00000000..a0c9a659 --- /dev/null +++ b/src/wix/test/Directory.Build.props @@ -0,0 +1,10 @@ + + + + + + + + $(OutputPath)test\$(ProjectName) + + diff --git a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj index 02a82e89..936fa4b9 100644 --- a/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj +++ b/src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj @@ -6,7 +6,7 @@ net472 false embedded - win-x86 + win-x64 false @@ -22,6 +22,12 @@ + + + + + + diff --git a/src/wix/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj b/src/wix/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj index ae3ff65e..44772187 100644 --- a/src/wix/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj +++ b/src/wix/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj @@ -13,6 +13,12 @@ + + + + + + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj b/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj index c03418e8..b84b1ed3 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj +++ b/src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj @@ -13,6 +13,12 @@ + + + + + + diff --git a/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs b/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs index 875e3279..028ea0cf 100644 --- a/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs +++ b/src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs @@ -17,7 +17,7 @@ namespace WixToolsetTest.Sdk public static class MsbuildUtilities { - public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "publish", "WixToolset.Sdk"); + public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk"); public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props"); public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true) diff --git a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj index 6111a184..44999f3d 100644 --- a/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj +++ b/src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj @@ -14,6 +14,12 @@ + + + + + + diff --git a/src/wix/wix.sln b/src/wix/wix.sln index d1a0e78e..15ee82e4 100644 --- a/src/wix/wix.sln +++ b/src/wix/wix.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31129.286 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.32112.339 MinimumVisualStudioVersion = 15.0.26124.0 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Converters", "WixToolset.Converters\WixToolset.Converters.csproj", "{6FAF6385-6598-4B89-972B-C31AFCA14538}" EndProject @@ -272,8 +272,8 @@ Global {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x64.Build.0 = Release|Any CPU {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.ActiveCfg = Release|Any CPU {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.Build.0 = Release|Any CPU - {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.ActiveCfg = Debug|Win32 - {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.Build.0 = Debug|Win32 + {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.Build.0 = Debug|x64 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.ActiveCfg = Debug|ARM64 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.Build.0 = Debug|ARM64 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/src/wix/wix/wix.csproj b/src/wix/wix/wix.csproj index 617cb0c0..e0351019 100644 --- a/src/wix/wix/wix.csproj +++ b/src/wix/wix/wix.csproj @@ -24,18 +24,26 @@ - - + + + + + + + + + + + + - -