aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2022-02-14 13:39:03 -0800
committerRob Mensching <rob@firegiant.com>2022-02-17 14:52:59 -0800
commit4310916863735f641d2aa2e3f44d47c7b08c9d49 (patch)
tree00e2fe71b151c3b437f011f08b76d2df38d0918f
parent9bf030f84f8717d3565d733acfd796bfc52b5fc0 (diff)
downloadwix-4310916863735f641d2aa2e3f44d47c7b08c9d49.tar.gz
wix-4310916863735f641d2aa2e3f44d47c7b08c9d49.tar.bz2
wix-4310916863735f641d2aa2e3f44d47c7b08c9d49.zip
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.
-rw-r--r--src/wix/WixToolset.Core.Native/WixToolset.Core.Native.csproj7
-rw-r--r--src/wix/test/Directory.Build.props10
-rw-r--r--src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj8
-rw-r--r--src/wix/test/WixToolsetTest.Core.Native/WixToolsetTest.Core.Native.csproj6
-rw-r--r--src/wix/test/WixToolsetTest.CoreIntegration/WixToolsetTest.CoreIntegration.csproj6
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/MsbuildUtilities.cs2
-rw-r--r--src/wix/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj6
-rw-r--r--src/wix/wix.sln8
-rw-r--r--src/wix/wix/wix.csproj23
9 files changed, 56 insertions, 20 deletions
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 @@
24 <ProjectReference Include="..\wixnative\wixnative.vcxproj" ReferenceOutputAssembly="false" PrivateAssets="All" Properties="Platform=x64" /> 24 <ProjectReference Include="..\wixnative\wixnative.vcxproj" ReferenceOutputAssembly="false" PrivateAssets="All" Properties="Platform=x64" />
25 </ItemGroup> 25 </ItemGroup>
26 26
27 <!-- Copy the x64 binaries for unittests since we've standardized on VS2022 (which is 64-bit only) -->
28 <ItemGroup>
29 <None Include="..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" />
30 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" />
31 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.pdb" CopyToOutputDirectory="PreserveNewest" />
32 </ItemGroup>
33
34 <ItemGroup> 27 <ItemGroup>
35 <PackageReference Include="WixToolset.Data" /> 28 <PackageReference Include="WixToolset.Data" />
36 <PackageReference Include="System.IO.FileSystem.AccessControl" /> 29 <PackageReference Include="System.IO.FileSystem.AccessControl" />
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 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project>
5 <Import Project="..\Directory.Build.props" />
6
7 <PropertyGroup>
8 <OutputPath>$(OutputPath)test\$(ProjectName)</OutputPath>
9 </PropertyGroup>
10</Project>
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 @@
6 <TargetFramework>net472</TargetFramework> 6 <TargetFramework>net472</TargetFramework>
7 <IsPackable>false</IsPackable> 7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType> 8 <DebugType>embedded</DebugType>
9 <RuntimeIdentifier>win-x86</RuntimeIdentifier> 9 <RuntimeIdentifier>win-x64</RuntimeIdentifier>
10 <SignOutput>false</SignOutput> 10 <SignOutput>false</SignOutput>
11 </PropertyGroup> 11 </PropertyGroup>
12 12
@@ -22,6 +22,12 @@
22 <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" /> 22 <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" />
23 </ItemGroup> 23 </ItemGroup>
24 24
25 <!-- Copy the x64 binaries for unittests since we've standardized on VS2022 (which is 64-bit only) -->
26 <ItemGroup>
27 <None Include="..\..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" />
28 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" />
29 </ItemGroup>
30
25 <ItemGroup> 31 <ItemGroup>
26 <PackageReference Include="Microsoft.Build.Tasks.Core" /> 32 <PackageReference Include="Microsoft.Build.Tasks.Core" />
27 <PackageReference Include="WixBuildTools.TestSupport" /> 33 <PackageReference Include="WixBuildTools.TestSupport" />
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 @@
13 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" /> 13 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
14 </ItemGroup> 14 </ItemGroup>
15 15
16 <!-- Copy the x64 binaries for unittests since we've standardized on VS2022 (which is 64-bit only) -->
17 <ItemGroup>
18 <None Include="..\..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" />
19 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" />
20 </ItemGroup>
21
16 <ItemGroup> 22 <ItemGroup>
17 <ProjectReference Include="..\..\WixToolset.Core.Native\WixToolset.Core.Native.csproj" /> 23 <ProjectReference Include="..\..\WixToolset.Core.Native\WixToolset.Core.Native.csproj" />
18 </ItemGroup> 24 </ItemGroup>
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 @@
13 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" /> 13 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
14 </ItemGroup> 14 </ItemGroup>
15 15
16 <!-- Copy the x64 binaries for unittests since we've standardized on VS2022 (which is 64-bit only) -->
17 <ItemGroup>
18 <None Include="..\..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" />
19 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" />
20 </ItemGroup>
21
16 <ItemGroup> 22 <ItemGroup>
17 <ProjectReference Include="..\..\WixToolset.Core\WixToolset.Core.csproj" /> 23 <ProjectReference Include="..\..\WixToolset.Core\WixToolset.Core.csproj" />
18 <ProjectReference Include="..\..\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" /> 24 <ProjectReference Include="..\..\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" />
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
17 17
18 public static class MsbuildUtilities 18 public static class MsbuildUtilities
19 { 19 {
20 public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "publish", "WixToolset.Sdk"); 20 public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk");
21 public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props"); 21 public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props");
22 22
23 public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true) 23 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 @@
14 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" /> 14 <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
15 </ItemGroup> 15 </ItemGroup>
16 16
17 <!-- Copy the x64 binaries for unittests since we've standardized on VS2022 (which is 64-bit only) -->
18 <ItemGroup>
19 <None Include="..\..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" />
20 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" />
21 </ItemGroup>
22
17 <ItemGroup> 23 <ItemGroup>
18 <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" /> 24 <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" />
19 </ItemGroup> 25 </ItemGroup>
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 @@
1Microsoft Visual Studio Solution File, Format Version 12.00 1Microsoft Visual Studio Solution File, Format Version 12.00
2# Visual Studio Version 16 2# Visual Studio Version 17
3VisualStudioVersion = 16.0.31129.286 3VisualStudioVersion = 17.0.32112.339
4MinimumVisualStudioVersion = 15.0.26124.0 4MinimumVisualStudioVersion = 15.0.26124.0
5Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Converters", "WixToolset.Converters\WixToolset.Converters.csproj", "{6FAF6385-6598-4B89-972B-C31AFCA14538}" 5Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Converters", "WixToolset.Converters\WixToolset.Converters.csproj", "{6FAF6385-6598-4B89-972B-C31AFCA14538}"
6EndProject 6EndProject
@@ -272,8 +272,8 @@ Global
272 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x64.Build.0 = Release|Any CPU 272 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x64.Build.0 = Release|Any CPU
273 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.ActiveCfg = Release|Any CPU 273 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.ActiveCfg = Release|Any CPU
274 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.Build.0 = Release|Any CPU 274 {23FC60D7-B101-42F8-9786-DB7A9CD964A2}.Release|x86.Build.0 = Release|Any CPU
275 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.ActiveCfg = Debug|Win32 275 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.ActiveCfg = Debug|x64
276 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.Build.0 = Debug|Win32 276 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|Any CPU.Build.0 = Debug|x64
277 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.ActiveCfg = Debug|ARM64 277 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.ActiveCfg = Debug|ARM64
278 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.Build.0 = Debug|ARM64 278 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|ARM64.Build.0 = Debug|ARM64
279 {8497EC72-B8D0-4272-A9D0-7E9D871CEFBF}.Debug|x64.ActiveCfg = Debug|x64 279 {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 @@
24 <ProjectReference Include="..\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" /> 24 <ProjectReference Include="..\WixToolset.Core.WindowsInstaller\WixToolset.Core.WindowsInstaller.csproj" />
25 </ItemGroup> 25 </ItemGroup>
26 26
27 <ItemGroup Condition=" '$(NCrunch)'=='' "> 27 <ItemGroup Condition=" '$(TargetFrameworkIdentifier)'=='.NETFramework' and '$(NCrunch)'=='' ">
28 <NativeLibrary Include="..\wixnative\Win32\mergemod.dll" RuntimeIdentifier="win-x86" /> 28 <!-- Copy the x64 binaries when there is no RuntimeIdentifier since we've standardized on VS2022 (which is 64-bit only) -->
29 <None Include="..\wixnative\x64\mergemod.dll" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x64' or '$(RuntimeIdentifier)'=='' " />
30 <None Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x64' or '$(RuntimeIdentifier)'=='' " />
31
32 <None Include="..\wixnative\Win32\mergemod.dll" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x86' " />
33 <None Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.exe" CopyToOutputDirectory="PreserveNewest" Condition=" '$(RuntimeIdentifier)'=='win-x86' " />
34 </ItemGroup>
35
36 <ItemGroup Condition=" '$(TargetFrameworkIdentifier)'!='.NETFramework' and '$(NCrunch)'=='' ">
37 <NativeLibrary Include="..\wixnative\ARM64\mergemod.dll" RuntimeIdentifier="win-arm64" />
29 <NativeLibrary Include="..\wixnative\x64\mergemod.dll" RuntimeIdentifier="win-x64" /> 38 <NativeLibrary Include="..\wixnative\x64\mergemod.dll" RuntimeIdentifier="win-x64" />
39 <NativeLibrary Include="..\wixnative\Win32\mergemod.dll" RuntimeIdentifier="win-x86" />
30 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\ARM64\wixnative.exe" RuntimeIdentifier="win-arm64" /> 40 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\ARM64\wixnative.exe" RuntimeIdentifier="win-arm64" />
31 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\ARM64\wixnative.pdb" RuntimeIdentifier="win-arm64" /> 41 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\ARM64\wixnative.pdb" RuntimeIdentifier="win-arm64" />
32 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" RuntimeIdentifier="win-x64" /> 42 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.exe" RuntimeIdentifier="win-x64" />
33 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.pdb" RuntimeIdentifier="win-x64" /> 43 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x64\wixnative.pdb" RuntimeIdentifier="win-x64" />
34 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.exe" RuntimeIdentifier="win-x86" /> 44 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.exe" RuntimeIdentifier="win-x86" />
35 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.pdb" RuntimeIdentifier="win-x86" /> 45 <NativeLibrary Include="$(BaseOutputPath)$(Configuration)\x86\wixnative.pdb" RuntimeIdentifier="win-x86" />
36 </ItemGroup>
37 46
38 <ItemGroup>
39 <!-- 47 <!--
40 This PackageReference is required so the RuntimeTargetsCopyLocalItems have a package (any package would 48 This PackageReference is required so the RuntimeTargetsCopyLocalItems have a package (any package would
41 do, WixToolset.Data is as good as any) to "attach" themselves to. 49 do, WixToolset.Data is as good as any) to "attach" themselves to.
@@ -48,8 +56,9 @@
48 NuGetPackageId="WixToolset.Data" 56 NuGetPackageId="WixToolset.Data"
49 RuntimeIdentifier="%(RuntimeIdentifier)" 57 RuntimeIdentifier="%(RuntimeIdentifier)"
50 /> 58 />
51 <Content Include="@(RuntimeTargetsCopyLocalItems)" 59 <None Include="@(RuntimeTargetsCopyLocalItems)"
52 Link="%(DestinationSubDirectory)\%(FileName)%(Extension)" 60 Link="%(DestinationSubDirectory)\%(FileName)%(Extension)"
53 CopyToOutputDirectory="PreserveNewest" /> 61 CopyToOutputDirectory="PreserveNewest" />
54 </ItemGroup> 62 </ItemGroup>
63
55</Project> 64</Project>