Port dependency tests from old repo.
Sean Hall committed
Mar 8, 2021 at 16:06 UTC
99d7440134d0f33683d1150a770a2bc594be41de
74 files changed
+2206
-24
BurnE2ETests.sln
+14
@@ -5,6 +5,8 @@ VisualStudioVersion = 16.0.29503.13
5
MinimumVisualStudioVersion = 10.0.40219.1
6
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestBA", "src\TestBA\TestBA.csproj", "{04022D35-6D75-49D0-91D2-4208E09DBA6D}"
7
EndProject
8
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestExe", "src\TestExe\TestExe.csproj", "{B038B342-BE42-4951-82A9-7789412CF37F}"
9
+EndProject
10
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixTestTools", "src\WixTestTools\WixTestTools.csproj", "{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}"
11
EndProject
12
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BurnE2E", "src\WixToolsetTest.BurnE2E\WixToolsetTest.BurnE2E.csproj", "{FED9D707-E5C3-4867-87B0-FABDB5EB0823}"
@@ -31,6 +33,18 @@ Global
33
{04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x64.Build.0 = Release|Any CPU
34
{04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.ActiveCfg = Release|Any CPU
35
{04022D35-6D75-49D0-91D2-4208E09DBA6D}.Release|x86.Build.0 = Release|Any CPU
36
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
37
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|Any CPU.Build.0 = Debug|Any CPU
38
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.ActiveCfg = Debug|Any CPU
39
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x64.Build.0 = Debug|Any CPU
40
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.ActiveCfg = Debug|Any CPU
41
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Debug|x86.Build.0 = Debug|Any CPU
42
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.ActiveCfg = Release|Any CPU
43
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|Any CPU.Build.0 = Release|Any CPU
44
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.ActiveCfg = Release|Any CPU
45
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x64.Build.0 = Release|Any CPU
46
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.ActiveCfg = Release|Any CPU
47
+ {B038B342-BE42-4951-82A9-7789412CF37F}.Release|x86.Build.0 = Release|Any CPU
48
{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
49
{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
50
{3D3B02F3-79B6-4BD5-AD49-2889DA3849A7}.Debug|x64.ActiveCfg = Debug|Any CPU
global.json
+1
-1
@@ -1,6 +1,6 @@
1
{
2
"msbuild-sdks": {
3
- "WixToolset.Sdk": "4.0.0-build-0194"
3
+ "WixToolset.Sdk": "4.0.0-build-0195"
4
},
5
"sdk": {
6
"allowPrerelease": false
nuget.config
+1
@@ -5,6 +5,7 @@
5
<add key="wixtoolset-balutil" value="https://ci.appveyor.com/nuget/wixtoolset-balutil" />
6
<add key="wixtoolset-bal-wixext" value="https://ci.appveyor.com/nuget/wixtoolset-bal-wixext" />
7
<add key="wixtoolset-data" value="https://ci.appveyor.com/nuget/wixtoolset-data" />
8
+ <add key="wixtoolset-dependency-wixext" value="https://ci.appveyor.com/nuget/wixtoolset-dependency-wixext" />
9
<add key="wixtoolset-dtf" value="https://ci.appveyor.com/nuget/wixtoolset-dtf" />
10
<add key="wixtoolset-netfx-wixext" value="https://ci.appveyor.com/nuget/wixtoolset-netfx-wixext" />
11
<add key="wixtoolset-tools" value="https://ci.appveyor.com/nuget/wixtoolset-tools" />
src/TestData/DependencyTests/BundleAv1/BundleA.props
new
+11
@@ -0,0 +1,11 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <BundleName>BundleA</BundleName>
6
+ <UpgradeCode>{6950EF3F-674E-4689-A5C8-80D12AB6E34F}</UpgradeCode>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+</Project>
src/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="BundleA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.0.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
9
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
13
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
14
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
15
+ </ItemGroup>
16
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleAv1/BundleAv1.wxs
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
6
+ <Fragment>
7
+ <util:RegistrySearch Root="HKLM" Key="$(var.TestExeRegistryKey)" Value="Version" Variable="ExeA_Version" />
8
+
9
+ <PackageGroup Id="BundlePackages">
10
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
11
+ <ExePackage Id="ExeA" Cache="no" PerMachine="yes"
12
+ DetectCondition="ExeA_Version AND ExeA_Version >= v$(var.Version)"
13
+ InstallArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
14
+ RepairArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
15
+ UninstallArguments="/regd "HKLM\$(var.TestExeRegistryKey),Version"">
16
+ <Provides Key="$(var.TestGroupName)_ExeA,v1.0" Version="$(var.Version)" />
17
+ <PayloadGroupRef Id="TestExePayloads" />
18
+ </ExePackage>
19
+ </PackageGroup>
20
+ </Fragment>
21
+</Wix>
src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\BundleAv1\BundleA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PackageAv1_0_1\PackageAv1_0_1.wixproj" />
9
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
13
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
14
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
15
+ </ItemGroup>
16
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wxs
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
6
+ <Fragment>
7
+ <util:RegistrySearch Root="HKLM" Key="$(var.TestExeRegistryKey)" Value="Version" Variable="ExeA_Version" />
8
+
9
+ <PackageGroup Id="BundlePackages">
10
+ <MsiPackage Id="PackageA" Name="PackageAv1.msi" SourceFile="$(var.PackageAv1_0_1.TargetPath)" />
11
+ <ExePackage Id="ExeA" Cache="no" PerMachine="yes"
12
+ DetectCondition="ExeA_Version AND ExeA_Version >= v$(var.Version)"
13
+ InstallArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
14
+ RepairArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
15
+ UninstallArguments="/regd "HKLM\$(var.TestExeRegistryKey),Version"">
16
+ <Provides Key="$(var.TestGroupName)_ExeA,v1.0" Version="$(var.Version)" />
17
+ <PayloadGroupRef Id="TestExePayloads" />
18
+ </ExePackage>
19
+ </PackageGroup>
20
+ </Fragment>
21
+</Wix>
src/TestData/DependencyTests/BundleB/Bundle.wxs
new
+40
@@ -0,0 +1,40 @@
1
+<!-- 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. -->
2
+
3
+<?ifndef Version?>
4
+<?define Version = 1.0.0.0?>
5
+<?endif?>
6
+
7
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal">
8
+ <!-- ProviderKey should be the only thing different from the template -->
9
+ <Bundle Name="~$(var.TestGroupName) - $(var.BundleName)" Version="$(var.Version)" UpgradeCode="$(var.UpgradeCode)" Compressed="yes" ProviderKey="WiX.$(var.TestGroupName).$(var.BundleName).B">
10
+ <Log Prefix="~$(var.TestGroupName)_$(var.BundleName)" />
11
+
12
+ <Variable Name="TestGroupName" Value="$(var.TestGroupName)" />
13
+
14
+ <?ifdef SoftwareTag?>
15
+ <SoftwareTag Regid="regid.1995-08.com.example" InstallPath="[CommonAppDataFolder]regid.1995-08.com.example" />
16
+ <?endif?>
17
+
18
+ <?ifndef BA?>
19
+ <!-- pulled in through the PackageGroupRef below -->
20
+ <?elseif $(var.BA) = "TestBAdnc"?>
21
+ <!-- pulled in through the PackageGroupRef below -->
22
+ <?elseif $(var.BA) = "hyperlinkLicense"?>
23
+ <BootstrapperApplication>
24
+ <bal:WixStandardBootstrapperApplication LicenseUrl="" Theme="hyperlinkLicense" />
25
+ </BootstrapperApplication>
26
+ <?else?>
27
+ <BootstrapperApplicationRef Id="$(var.BA)" />
28
+ <?endif?>
29
+
30
+ <Chain>
31
+ <?ifndef BA?>
32
+ <PackageGroupRef Id="TestBA" />
33
+ <?elseif $(var.BA) = "TestBAdnc"?>
34
+ <PackageGroupRef Id="TestBAdnc" />
35
+ <?endif?>
36
+
37
+ <PackageGroupRef Id="BundlePackages" />
38
+ </Chain>
39
+ </Bundle>
40
+</Wix>
src/TestData/DependencyTests/BundleB/BundleB.wixproj
new
+18
@@ -0,0 +1,18 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{228859BB-F917-4F43-A1E0-50C8DCCA92EF}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10
+ <ProjectReference Include="..\PackageB\PackageB.wixproj" />
11
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
15
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
16
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
17
+ </ItemGroup>
18
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleB/BundleB.wxs
new
+22
@@ -0,0 +1,22 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
6
+ <Fragment>
7
+ <util:RegistrySearch Root="HKLM" Key="$(var.TestExeRegistryKey)" Value="Version" Variable="ExeA_Version" />
8
+
9
+ <PackageGroup Id="BundlePackages">
10
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
11
+ <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" />
12
+ <ExePackage Id="ExeA" Cache="no" PerMachine="yes"
13
+ DetectCondition="ExeA_Version AND ExeA_Version >= v$(var.Version)"
14
+ InstallArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
15
+ RepairArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
16
+ UninstallArguments="/regd "HKLM\$(var.TestExeRegistryKey),Version"">
17
+ <Provides Key="$(var.TestGroupName)_ExeA,v1.0" Version="$(var.Version)" />
18
+ <PayloadGroupRef Id="TestExePayloads" />
19
+ </ExePackage>
20
+ </PackageGroup>
21
+ </Fragment>
22
+</Wix>
src/TestData/DependencyTests/BundleC/BundleC.wixproj
new
+22
@@ -0,0 +1,22 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <!-- Same as BundleA -->
6
+ <UpgradeCode>{6950EF3F-674E-4689-A5C8-80D12AB6E34F}</UpgradeCode>
7
+ <Version>1.0.1.0</Version>
8
+ </PropertyGroup>
9
+ <ItemGroup>
10
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
14
+ <ProjectReference Include="..\PatchA\PatchA.wixproj" />
15
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
19
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
20
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
21
+ </ItemGroup>
22
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleC/BundleC.wxs
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
4
+ <Fragment>
5
+ <PackageGroup Id="BundlePackages">
6
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)">
7
+ <SlipstreamMsp Id="PatchA"/>
8
+ </MsiPackage>
9
+ <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/TestData/DependencyTests/BundleD/BundleD.wixproj
new
+22
@@ -0,0 +1,22 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <!-- Same as BundleA -->
6
+ <UpgradeCode>{6950EF3F-674E-4689-A5C8-80D12AB6E34F}</UpgradeCode>
7
+ <Version>1.0.1.0</Version>
8
+ <SuppressSpecificWarnings>1153</SuppressSpecificWarnings>
9
+ </PropertyGroup>
10
+ <ItemGroup>
11
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
12
+ </ItemGroup>
13
+ <ItemGroup>
14
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
15
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
16
+ </ItemGroup>
17
+ <ItemGroup>
18
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
19
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
20
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
21
+ </ItemGroup>
22
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleD/BundleD.wxs
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
4
+ <Fragment>
5
+ <PackageGroup Id="BundlePackages">
6
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
7
+ <ExePackage Id="TestExe" Cache="no" PerMachine="yes" Permanent="yes" InstallArguments="/ec 1603">
8
+ <PayloadGroupRef Id="TestExePayloads" />
9
+ </ExePackage>
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/TestData/DependencyTests/BundleE/BundleE.wixproj
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{250B4261-E67F-47E0-AB15-209EF58B769D}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
13
+ <ProjectReference Include="..\PackageC\PackageC.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
19
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleE/BundleE.wxs
new
+19
@@ -0,0 +1,19 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
6
+ <Fragment>
7
+ <util:RegistrySearch Root="HKLM" Key="$(var.TestExeRegistryKey)" Value="Version" Variable="ExeA_Version" />
8
+
9
+ <PackageGroup Id="BundlePackages">
10
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
11
+ <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" Vital="no" />
12
+ <ExePackage Id="ExeA" Cache="no" Vital="no" PerMachine="yes" InstallArguments="/ec 1603"
13
+ DetectCondition="ExeA_Version AND ExeA_Version >= v$(var.Version)">
14
+ <Provides Key="$(var.TestGroupName)_ExeA,v1.0" Version="$(var.Version)" />
15
+ <PayloadGroupRef Id="TestExePayloads" />
16
+ </ExePackage>
17
+ </PackageGroup>
18
+ </Fragment>
19
+</Wix>
src/TestData/DependencyTests/BundleF/BundleF.wixproj
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{EC2B2B3F-E57C-45A4-A0E8-762156DAD99D}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
13
+ <ProjectReference Include="..\PackageB\PackageB.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
19
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleF/BundleF.wxs
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
+ <Fragment>
5
+ <RelatedBundle Id="583B5ECB-04E6-4837-A30C-A1ADCBE24235" Action="Detect" />
6
+
7
+ <PackageGroup Id="BundlePackages">
8
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
9
+ <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" />
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOn.wxs
new
+22
@@ -0,0 +1,22 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
6
+ <Fragment>
7
+ <RelatedBundle Id="583B5ECB-04E6-4837-A30C-A1ADCBE24235" Action="Addon" />
8
+ <util:RegistrySearch Root="HKLM" Key="$(var.TestExeRegistryKey)" Value="Version" Variable="ExeA_Version" />
9
+
10
+ <PackageGroup Id="BundlePackages">
11
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
12
+ <ExePackage Id="ExeA" Cache="no" PerMachine="yes"
13
+ DetectCondition="ExeA_Version AND ExeA_Version >= v$(var.Version)"
14
+ InstallArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
15
+ RepairArguments="/regw "HKLM\$(var.TestExeRegistryKey),Version,String,$(var.Version)""
16
+ UninstallArguments="/regd "HKLM\$(var.TestExeRegistryKey),Version"">
17
+ <Provides Key="$(var.TestGroupName)_ExeA,v1.0" Version="$(var.Version)" />
18
+ <PayloadGroupRef Id="TestExePayloads" />
19
+ </ExePackage>
20
+ </PackageGroup>
21
+ </Fragment>
22
+</Wix>
src/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj
new
+20
@@ -0,0 +1,20 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{022D0F5D-D140-47E1-A19A-5B2CEEE52668}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
13
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
14
+ </ItemGroup>
15
+ <ItemGroup>
16
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
17
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
18
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
19
+ </ItemGroup>
20
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{8AB16F34-CA65-46E1-BDC0-08F157B4781C}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\BundleF_AddOnA\BundleF_AddOn.wxs" Link="BundleF_AddOn.wxs" />
10
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
19
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchA.props
new
+11
@@ -0,0 +1,11 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <BundleName>BundleF_PatchA</BundleName>
6
+ <UpgradeCode>{90F41437-BEF8-4ED8-8902-C5DED74E4F6C}</UpgradeCode>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+</Project>
src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="BundleF_PatchA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PatchA\PatchA.wixproj" />
9
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
13
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
14
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
15
+ </ItemGroup>
16
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wxs
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
+ <Fragment>
5
+ <RelatedBundle Id="{EC2B2B3F-E57C-45A4-A0E8-762156DAD99D}" Action="Patch" />
6
+
7
+ <PackageGroup Id="BundlePackages">
8
+ <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" PerMachine="yes">
9
+ <Provides Key="$(var.TestGroupName)_PatchA" Version="$(var.Version)" />
10
+ </MspPackage>
11
+ </PackageGroup>
12
+ </Fragment>
13
+</Wix>
src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj
new
+17
@@ -0,0 +1,17 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\BundleF_PatchAv1_0_1\BundleF_PatchA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.2.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PatchA\PatchA.wixproj" />
9
+ <ProjectReference Include="..\PatchB\PatchB.wixproj" />
10
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
14
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
15
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
16
+ </ItemGroup>
17
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wxs
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
+ <Fragment>
5
+ <RelatedBundle Id="{EC2B2B3F-E57C-45A4-A0E8-762156DAD99D}" Action="Patch" />
6
+
7
+ <PackageGroup Id="BundlePackages">
8
+ <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" PerMachine="yes">
9
+ <Provides Key="$(var.TestGroupName)_PatchA" Version="$(var.Version)" />
10
+ </MspPackage>
11
+ <MspPackage Id="PatchB" SourceFile="$(var.PatchB.TargetPath)" PerMachine="yes">
12
+ <Provides Key="$(var.TestGroupName)_PatchB" Version="$(var.Version)" />
13
+ </MspPackage>
14
+ </PackageGroup>
15
+ </Fragment>
16
+</Wix>
src/TestData/DependencyTests/BundleHv1/BundleH.props
new
+10
@@ -0,0 +1,10 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{C5EA6B61-EF32-48E0-A6F9-08EB6D096843}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9
+ </ItemGroup>
10
+</Project>
src/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="BundleH.props" />
4
+ <ItemGroup>
5
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
6
+ <ProjectReference Include="..\PackageDv1\PackageDv1.wixproj" />
7
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
8
+ </ItemGroup>
9
+ <ItemGroup>
10
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
11
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleHv1/BundleHv1.wxs
new
+11
@@ -0,0 +1,11 @@
1
+<!-- 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. -->
2
+
3
+
4
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
+ <Fragment>
6
+ <PackageGroup Id="BundlePackages">
7
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" Visible="yes" Permanent="yes" />
8
+ <MsiPackage Id="PackageD" SourceFile="$(var.PackageDv1.TargetPath)" Visible="yes" />
9
+ </PackageGroup>
10
+ </Fragment>
11
+</Wix>
src/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\BundleHv1\BundleH.props" />
4
+ <PropertyGroup>
5
+ <Version>2.0.0.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
9
+ <ProjectReference Include="..\PackageDv2\PackageDv2.wixproj" />
10
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
14
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
15
+ </ItemGroup>
16
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleHv2/BundleHv2.wxs
new
+11
@@ -0,0 +1,11 @@
1
+<!-- 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. -->
2
+
3
+
4
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
5
+ <Fragment>
6
+ <PackageGroup Id="BundlePackages">
7
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" Visible="yes" Permanent="yes" />
8
+ <MsiPackage Id="PackageD" SourceFile="$(var.PackageDv2.TargetPath)" Visible="yes" />
9
+ </PackageGroup>
10
+ </Fragment>
11
+</Wix>
src/TestData/DependencyTests/BundleJ/BundleJ.wixproj
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{37BDF884-C24A-4C12-9D0C-421FC30747F2}</UpgradeCode>
6
+ <Version>1.0.0.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
13
+ <ProjectReference Include="..\PackageEv1\PackageEv1.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
19
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleJ/BundleJ.wxs
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
+ <Fragment>
5
+ <RelatedBundle Id="{B1617DA6-F824-4B9F-B9B2-A6AFD07A652D}" Action="Detect" />
6
+
7
+ <PackageGroup Id="BundlePackages">
8
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
9
+ <MsiPackage Id="PackageE" SourceFile="$(var.PackageEv1.TargetPath)" />
10
+ </PackageGroup>
11
+ </Fragment>
12
+</Wix>
src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{353B5A34-3B46-424E-8817-25B3D01C8C16}</UpgradeCode>
6
+ <Version>1.0.1.0</Version>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
10
+ </ItemGroup>
11
+ <ItemGroup>
12
+ <ProjectReference Include="..\PackageEv1_0_1\PackageEv1_0_1.wixproj" />
13
+ <ProjectReference Include="..\PatchA\PatchA.wixproj" />
14
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
15
+ </ItemGroup>
16
+ <ItemGroup>
17
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
18
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
19
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
20
+ </ItemGroup>
21
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wxs
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+
3
+<?define TestExeRegistryKey = Software\WiX\Tests\$(var.TestGroupName)\ExeA?>
4
+
5
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
6
+ <Fragment>
7
+ <RelatedBundle Id="{B1617DA6-F824-4B9F-B9B2-A6AFD07A652D}" Action="Patch" />
8
+
9
+ <PackageGroup Id="BundlePackages">
10
+ <MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)">
11
+ <Provides Key="$(var.TestGroupName)_PatchA" Version="$(var.Version)" />
12
+ </MspPackage>
13
+ <MsiPackage Id="PackageE" Name="PackageEv1.msi" SourceFile="$(var.PackageEv1_0_1.TargetPath)" />
14
+ </PackageGroup>
15
+ </Fragment>
16
+</Wix>
src/TestData/DependencyTests/BundleL/BundleL.wixproj
new
+20
@@ -0,0 +1,20 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>Bundle</OutputType>
5
+ <UpgradeCode>{2EDB07DC-DCCD-419F-AD25-52ABF36B53AE}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
12
+ <ProjectReference Include="..\PackageC\PackageC.wixproj" />
13
+ <ProjectReference Include="..\..\TestBA\TestBAWixlib\testbawixlib.wixproj" />
14
+ </ItemGroup>
15
+ <ItemGroup>
16
+ <PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
17
+ <PackageReference Include="WixToolset.NetFx.wixext" Version="4.0.64" />
18
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
19
+ </ItemGroup>
20
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/BundleL/BundleL.wxs
new
+10
@@ -0,0 +1,10 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
4
+ <Fragment>
5
+ <PackageGroup Id="BundlePackages">
6
+ <MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
7
+ <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" Vital="no" />
8
+ </PackageGroup>
9
+ </Fragment>
10
+</Wix>
src/TestData/DependencyTests/PackageAv1/PackageA.props
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <PackageName>PackageA</PackageName>
5
+ <ProductComponentsRef>true</ProductComponentsRef>
6
+ <ProductCode>{6F171EC9-0774-4974-A8D1-493EF53CAB74}</ProductCode>
7
+ <UpgradeCode>{45E933B7-B56A-44D5-8EEC-625EC199085E}</UpgradeCode>
8
+ </PropertyGroup>
9
+ <ItemGroup>
10
+ <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
11
+ </ItemGroup>
12
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageAv1/PackageAv1.wixproj
new
+7
@@ -0,0 +1,7 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="PackageA.props" />
4
+ <ItemGroup>
5
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
6
+ </ItemGroup>
7
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageAv1/ProductComponents.wxs
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents">
6
+ <ComponentRef Id="FileComponent2" />
7
+ </ComponentGroup>
8
+ </Fragment>
9
+
10
+ <Fragment>
11
+ <Component Id="FileComponent2" Guid="BB609407-F2F4-458D-95F8-BF184D6E8496" Directory="INSTALLFOLDER">
12
+ <File Source="$(sys.SOURCEFILEPATH)" />
13
+ <Provides Key="WiX.$(var.TestGroupName).A,v1.0" dep:Check="yes" />
14
+ </Component>
15
+ </Fragment>
16
+</Wix>
src/TestData/DependencyTests/PackageAv1_0_1/PackageAv1_0_1.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\PackageAv1\PackageA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\PackageAv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageAv1_0_2/PackageAv1_0_2.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\PackageAv1\PackageA.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.2.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\PackageAv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageB/PackageB.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <ProductComponentsRef>true</ProductComponentsRef>
5
+ <UpgradeCode>{E26243B0-F1A2-4E74-A82D-25B306908E78}</UpgradeCode>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageB/ProductComponents.wxs
new
+18
@@ -0,0 +1,18 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents">
6
+ <ComponentRef Id="FileComponent2" />
7
+ </ComponentGroup>
8
+ </Fragment>
9
+
10
+ <Fragment>
11
+ <Component Id="FileComponent2" Guid="A1866388-65B4-4215-A8FB-9A7AADBE4E8E" Directory="INSTALLFOLDER">
12
+ <File Source="$(sys.SOURCEFILEPATH)" />
13
+ <Provides>
14
+ <Requires ProviderKey="WiX.$(var.TestGroupName).A,v1.0" Minimum="1.0.0.0" IncludeMinimum="yes" dep:Enforce="yes" />
15
+ </Provides>
16
+ </Component>
17
+ </Fragment>
18
+</Wix>
src/TestData/DependencyTests/PackageC/PackageC.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <UpgradeCode>{F21201D4-4782-4658-99C9-2E75D51FCFA6}</UpgradeCode>
5
+ </PropertyGroup>
6
+ <ItemGroup>
7
+ <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
8
+ </ItemGroup>
9
+ <ItemGroup>
10
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
11
+ <PackageReference Include="WixToolset.Util.wixext" Version="4.0.77" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageDv1/Package.wxs
new
+66
@@ -0,0 +1,66 @@
1
+<!-- 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. -->
2
+
3
+
4
+
5
+<?ifndef Version?>
6
+<?define Version = 1.0.0.0?>
7
+<?endif?>
8
+
9
+<?ifndef ProductCode?>
10
+<?define ProductCode = *?>
11
+<?endif?>
12
+
13
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
14
+ <Package Name="~$(var.TestGroupName) - $(var.PackageName)" Language="1033" Version="$(var.Version)" Manufacturer="Microsoft Corporation" UpgradeCode="$(var.UpgradeCode)" Compressed="yes" ProductCode="$(var.ProductCode)" Scope="perUser">
15
+ <MajorUpgrade Schedule="afterInstallInitialize" DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
16
+ <?ifndef CabPrefix?>
17
+ <MediaTemplate EmbedCab="yes" />
18
+ <?else?>
19
+ <MediaTemplate CabinetTemplate="{0}$(var.CabPrefix).cab" />
20
+ <?endif?>
21
+
22
+ <?ifdef SoftwareTag?>
23
+ <SoftwareTag Regid="regid.1995-08.com.example" InstallDirectory="LocalAppDataFolder" />
24
+ <?endif?>
25
+
26
+ <PropertyRef Id="TestVersion" />
27
+
28
+ <Feature Id="Complete" Level="1">
29
+ <ComponentRef Id="FileComponent" />
30
+ <ComponentRef Id="RegistryComponent" />
31
+ <?ifdef var.ProductComponents?>
32
+ <ComponentGroupRef Id="ProductComponents" />
33
+ <?endif?>
34
+ </Feature>
35
+ </Package>
36
+
37
+ <Fragment>
38
+ <Directory Id="TARGETDIR" Name="SourceDir">
39
+ <Directory Id="LocalAppDataFolder" />
40
+ <Directory Id="ProgramFilesFolder">
41
+ <Directory Id="WixDir" Name="~Test WiX">
42
+ <Directory Id="TestDir" Name="$(var.TestGroupName)">
43
+ <Directory Id="INSTALLFOLDER" Name="$(var.PackageName)" />
44
+ </Directory>
45
+ </Directory>
46
+ </Directory>
47
+ </Directory>
48
+ </Fragment>
49
+
50
+ <Fragment>
51
+ <Component Id="FileComponent" Guid="8AEF758B-5890-4490-8485-46BD65616A2B" Directory="INSTALLFOLDER">
52
+ <File Source="$(sys.SOURCEFILEPATH)" />
53
+ <Provides Key="WiX.$(var.TestGroupName).D,v1.0" dep:Check="yes" />
54
+ </Component>
55
+ </Fragment>
56
+
57
+ <Fragment>
58
+ <Component Id="RegistryComponent" Directory="INSTALLFOLDER">
59
+ <RegistryValue Root="HKCU" Key="Software\WiX\Tests\$(var.TestGroupName)" Name="$(var.PackageName)" Value="!(bind.Property.TestVersion)" Type="string" />
60
+ </Component>
61
+ </Fragment>
62
+
63
+ <Fragment>
64
+ <Property Id="TestVersion" Value="$(var.Version)" />
65
+ </Fragment>
66
+</Wix>
src/TestData/DependencyTests/PackageDv1/PackageD.props
new
+7
@@ -0,0 +1,7 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <PackageName>PackageD</PackageName>
5
+ <UpgradeCode>{AD82A938-2F54-45B8-A637-B14D8405A959}</UpgradeCode>
6
+ </PropertyGroup>
7
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageDv1/PackageDv1.wixproj
new
+7
@@ -0,0 +1,7 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="PackageD.props" />
4
+ <ItemGroup>
5
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
6
+ </ItemGroup>
7
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageDv2/PackageDv2.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\PackageDv1\PackageD.props" />
4
+ <PropertyGroup>
5
+ <Version>2.0.0.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\PackageDv1\Package.wxs" Link="Package.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageEv1/PackageE.props
new
+12
@@ -0,0 +1,12 @@
1
+<!-- 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. -->
2
+<Project>
3
+ <PropertyGroup>
4
+ <PackageName>PackageE</PackageName>
5
+ <ProductComponentsRef>true</ProductComponentsRef>
6
+ <ProductCode>{70FA13C7-0338-483F-A256-E5C83750BDE5}</ProductCode>
7
+ <UpgradeCode>{212A5698-457E-440F-88CC-98FC49A17378}</UpgradeCode>
8
+ </PropertyGroup>
9
+ <ItemGroup>
10
+ <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" />
11
+ </ItemGroup>
12
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageEv1/PackageEv1.wixproj
new
+7
@@ -0,0 +1,7 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="PackageE.props" />
4
+ <ItemGroup>
5
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
6
+ </ItemGroup>
7
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PackageEv1/ProductComponents.wxs
new
+16
@@ -0,0 +1,16 @@
1
+<!-- 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. -->
2
+
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:dep="http://wixtoolset.org/schemas/v4/wxs/dependency">
4
+ <Fragment>
5
+ <ComponentGroup Id="ProductComponents">
6
+ <ComponentRef Id="FileComponent2" />
7
+ </ComponentGroup>
8
+ </Fragment>
9
+
10
+ <Fragment>
11
+ <Component Id="FileComponent2" Guid="BB609407-F2F4-458D-95F8-BF184D6E8496" Directory="INSTALLFOLDER">
12
+ <File Source="$(sys.SOURCEFILEPATH)" />
13
+ <Provides Key="WiX.$(var.TestGroupName).E,v1.0" dep:Check="yes" />
14
+ </Component>
15
+ </Fragment>
16
+</Wix>
src/TestData/DependencyTests/PackageEv1_0_1/PackageEv1_0_1.wixproj
new
+13
@@ -0,0 +1,13 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <Import Project="..\PackageEv1\PackageE.props" />
4
+ <PropertyGroup>
5
+ <Version>1.0.1.0</Version>
6
+ </PropertyGroup>
7
+ <ItemGroup>
8
+ <Compile Include="..\PackageEv1\ProductComponents.wxs" Link="ProductComponents.wxs" />
9
+ </ItemGroup>
10
+ <ItemGroup>
11
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
12
+ </ItemGroup>
13
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PatchA/PatchA.wixproj
new
+15
@@ -0,0 +1,15 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>PatchCreation</OutputType>
5
+ <TargetExt>.msp</TargetExt>
6
+ <SuppressSpecificWarnings>1079</SuppressSpecificWarnings>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10
+ <ProjectReference Include="..\PackageAv1_0_1\PackageAv1_0_1.wixproj" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
14
+ </ItemGroup>
15
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PatchA/PatchA.wxs
new
+22
@@ -0,0 +1,22 @@
1
+<!-- 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. -->
2
+
3
+<?ifndef Version?>
4
+<?define Version = 1.0.0.0?>
5
+<?endif?>
6
+
7
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8
+ <Patch AllowRemoval="yes" Classification="Update" Description="Patch A in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch A" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9
+ <Media Id="100" Cabinet="PatchA" EmbedCab="yes">
10
+ <PatchBaseline
11
+ Id="PatchA"
12
+ BaselineFile="$(var.PackageAv1.TargetDir)$(var.PackageAv1.TargetName).wixpdb"
13
+ UpdateFile="$(var.PackageAv1_0_1.TargetDir)$(var.PackageAv1_0_1.TargetName).wixpdb"
14
+ />
15
+ </Media>
16
+
17
+ <PatchFamily Id="A" Version="$(var.Version)" Supersede="yes">
18
+ <ComponentRef Id="RegistryComponent"/>
19
+ <PropertyRef Id="TestVersion"/>
20
+ </PatchFamily>
21
+ </Patch>
22
+</Wix>
src/TestData/DependencyTests/PatchB/PatchB.wixproj
new
+15
@@ -0,0 +1,15 @@
1
+<!-- 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. -->
2
+<Project Sdk="WixToolset.Sdk">
3
+ <PropertyGroup>
4
+ <OutputType>PatchCreation</OutputType>
5
+ <TargetExt>.msp</TargetExt>
6
+ <SuppressSpecificWarnings>1079</SuppressSpecificWarnings>
7
+ </PropertyGroup>
8
+ <ItemGroup>
9
+ <ProjectReference Include="..\PackageAv1\PackageAv1.wixproj" />
10
+ <ProjectReference Include="..\PackageAv1_0_2\PackageAv1_0_2.wixproj" />
11
+ </ItemGroup>
12
+ <ItemGroup>
13
+ <PackageReference Include="WixToolset.Dependency.wixext" Version="4.0.24" />
14
+ </ItemGroup>
15
+</Project>
\ No newline at end of file
src/TestData/DependencyTests/PatchB/PatchB.wxs
new
+21
@@ -0,0 +1,21 @@
1
+<!-- 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. -->
2
+
3
+<?ifndef Version?>
4
+<?define Version = 1.0.0.0?>
5
+<?endif?>
6
+
7
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8
+ <Patch AllowRemoval="yes" Classification="Update" Description="Patch B in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch B" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9
+ <Media Id="100" Cabinet="PatchB" EmbedCab="yes">
10
+ <PatchBaseline
11
+ Id="PatchB"
12
+ BaselineFile="$(var.PackageAv1.TargetDir)$(var.PackageAv1.TargetName).wixpdb"
13
+ UpdateFile="$(var.PackageAv1_0_2.TargetDir)$(var.PackageAv1_0_2.TargetName).wixpdb"
14
+ />
15
+ </Media>
16
+
17
+ <PatchFamily Id="B" Version="$(var.Version)" Supersede="yes">
18
+ <PropertyRef Id="TestVersion"/>
19
+ </PatchFamily>
20
+ </Patch>
21
+</Wix>
src/TestData/Templates/PackageFail.wxs
+1
-1
@@ -19,7 +19,7 @@
19
</Feature>
20
21
<util:FailWhenDeferred />
22
- <Property Id="WIXFAILWHENDEFERRED" Value="1" />
22
+ <Property Id="WIXFAILWHENDEFERRED" Secure="yes" Value="1" />
23
</Package>
24
25
<Fragment>
src/TestData/TestBA/TestBAWixlib/TestExe.wxs
new
+9
@@ -0,0 +1,9 @@
1
+<!-- 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. -->
2
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3
+ <Fragment>
4
+ <PayloadGroup Id="TestExePayloads">
5
+ <ExePackagePayload SourceFile="!(bindpath.net2x86)\TestExe.exe" />
6
+ <Payload SourceFile="!(bindpath.net2x86)\TestExe.exe.config" />
7
+ </PayloadGroup>
8
+ </Fragment>
9
+</Wix>
src/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj
+1
@@ -11,6 +11,7 @@
11
</ItemGroup>
12
<ItemGroup>
13
<ProjectReference Include="..\..\..\TestBA\TestBA.csproj" />
14
+ <ProjectReference Include="..\..\..\TestExe\TestExe.csproj" />
15
</ItemGroup>
16
<ItemGroup>
17
<PackageReference Include="WixToolset.Bal.wixext" Version="4.0.89" />
src/TestData/TestData.proj
+8
@@ -5,6 +5,14 @@
5
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
<ItemGroup>
7
<TestDataProject Include="**\*.wixproj" />
8
+
9
+ <!-- https://github.com/wixtoolset/issues/issues/6387 -->
10
+ <TestDataProject Remove="DependencyTests\BundleC\BundleC.wixproj" />
11
+ <TestDataProject Remove="DependencyTests\BundleF_PatchAv1_0_1\BundleF_PatchAv1_0_1.wixproj" />
12
+ <TestDataProject Remove="DependencyTests\BundleF_PatchAv1_0_2\BundleF_PatchAv1_0_2.wixproj" />
13
+ <TestDataProject Remove="DependencyTests\BundleJ_Patch\BundleJ_Patch.wixproj" />
14
+ <TestDataProject Remove="DependencyTests\PatchA\PatchA.wixproj" />
15
+ <TestDataProject Remove="DependencyTests\PatchB\PatchB.wixproj" />
16
</ItemGroup>
17
18
<Target Name="Build">
src/TestExe/Program.cs
new
+74
@@ -0,0 +1,74 @@
1
+// 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.
2
+
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Linq;
6
+using System.Text;
7
+
8
+namespace TestExe
9
+{
10
+ class Program
11
+ {
12
+ static List<Task> tasks;
13
+ static int exitCodeToReturn = 0;
14
+
15
+ static int Main(string[] args)
16
+ {
17
+ Usage();
18
+ tasks = TaskParser.ParseTasks(args);
19
+
20
+ foreach (Task t in tasks)
21
+ {
22
+ // special case for the ExitCodeTask
23
+ if (t.GetType() == typeof(ExitCodeTask))
24
+ {
25
+ exitCodeToReturn = int.Parse(t.data);
26
+ }
27
+ else
28
+ {
29
+ t.RunTask();
30
+ }
31
+ }
32
+
33
+ Console.WriteLine("Exiting with ExitCode = {0}", exitCodeToReturn);
34
+ return exitCodeToReturn;
35
+ }
36
+
37
+ static void Usage()
38
+ {
39
+ Console.WriteLine(@"TestExe.exe");
40
+ Console.WriteLine(@"");
41
+ Console.WriteLine(@"TestExe can be passed various switches to define how it will behave and what tasks it will perform.");
42
+ Console.WriteLine(@"All switches are optional.");
43
+ Console.WriteLine(@"Any # of switches can be combined in any order.");
44
+ Console.WriteLine(@"Switches can be specified multiple times.");
45
+ Console.WriteLine(@"The order of the switches listed is the order they will be processed.");
46
+ Console.WriteLine(@"Info is written to stdout to describe what tasks are being performed as they are executed.");
47
+ Console.WriteLine(@"");
48
+ Console.WriteLine(@"Usage: TestExe.exe [tasks...]");
49
+ Console.WriteLine(@"");
50
+ Console.WriteLine(@"");
51
+ Console.WriteLine(@"/ec # Exit code to return. Can only be specified once. If not specified, 0 will be returned. Example: “/ec 3010” would return 3010");
52
+ Console.WriteLine(@"/s # Milliseconds to sleep before continuing. Example: “/s 5000” would sleep 5 seconds.");
53
+ Console.WriteLine(@"/sr #-# Random range of Milliseconds to sleep before continuing. Example: “/sr 5000-10000” would sleep between 5-10 seconds.");
54
+ Console.WriteLine(@"/log filename Create a log file called filename. Contents of the log are static text. Example: “/log %temp%\test.log” would create a %temp%\test.log file.");
55
+ Console.WriteLine(@"/Pinfo filename Create an xml file containing information about the process: PID, start time, user running the process, etc.");
56
+ Console.WriteLine(@"/fe filename Wait for a file to exist before continuing. Example: “/fe %temp%\cache\file.msi” would wait until %temp%\cache\file.msi exists.");
57
+ Console.WriteLine(@"/regw regkey,name,type,value (Re)writes a registry key with the specified value");
58
+ Console.WriteLine(@"/regd regkey,[name] Deletes registry key name or key and all of its children (subkeys and values)");
59
+ Console.WriteLine(@"");
60
+ Console.WriteLine(@"Example: ");
61
+ Console.WriteLine(@"");
62
+ Console.WriteLine(@"TestExe.exe /ec 1603 /Pinfo %temp%\Pinfo1.xml /s 1000 /log %temp%\log1.log /sr 5000-10000 /log %temp%\log2.log");
63
+ Console.WriteLine(@"");
64
+ Console.WriteLine(@"This would result in the following execution:");
65
+ Console.WriteLine(@" - Create an xml file with the current process info in it.");
66
+ Console.WriteLine(@" - Sleep 1 seconds");
67
+ Console.WriteLine(@" - Create log1.log");
68
+ Console.WriteLine(@" - Sleep between 5-10 seconds");
69
+ Console.WriteLine(@" - Create log2.log");
70
+ Console.WriteLine(@" - Exit with 1603");
71
+ Console.WriteLine(@"");
72
+ }
73
+ }
74
+}
src/TestExe/Task.cs
new
+471
@@ -0,0 +1,471 @@
1
+// 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.
2
+
3
+using System;
4
+using System.Collections.Generic;
5
+using System.Diagnostics;
6
+using System.IO;
7
+using System.Linq;
8
+using System.Management;
9
+using System.Text;
10
+using Microsoft.Win32;
11
+
12
+namespace TestExe
13
+{
14
+ public abstract class Task
15
+ {
16
+ public string data;
17
+
18
+ public Task(string Data)
19
+ {
20
+ data = Data;
21
+ }
22
+
23
+ public abstract void RunTask();
24
+
25
+ }
26
+
27
+ public class ExitCodeTask : Task
28
+ {
29
+ public ExitCodeTask(string Data) : base(Data) { }
30
+
31
+ public override void RunTask()
32
+ {
33
+ // this task does nothing. Just stores data about what exit code to return.
34
+ }
35
+ }
36
+
37
+ public class SleepTask : Task
38
+ {
39
+ public SleepTask(string Data) : base(Data) { }
40
+
41
+ public override void RunTask()
42
+ {
43
+ int milliseconds = int.Parse(this.data);
44
+ Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds);
45
+ System.Threading.Thread.Sleep(milliseconds);
46
+ }
47
+ }
48
+
49
+ public class SleepRandomTask : Task
50
+ {
51
+ public SleepRandomTask(string Data) : base(Data) { }
52
+
53
+ public override void RunTask()
54
+ {
55
+ int low = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[0]);
56
+ int high = int.Parse(data.Split(new string[] { ":" }, 2, StringSplitOptions.None)[1]);
57
+
58
+ Random r = new Random();
59
+ int milliseconds = r.Next(high - low) + low;
60
+ Console.WriteLine("Starting to sleep for {0} milliseconds", milliseconds);
61
+ System.Threading.Thread.Sleep(milliseconds);
62
+ }
63
+ }
64
+
65
+ public class LogTask : Task
66
+ {
67
+ string[] argsUsed;
68
+ public LogTask(string Data, string[] args)
69
+ : base(Data)
70
+ {
71
+ argsUsed = args;
72
+ }
73
+
74
+ public override void RunTask()
75
+ {
76
+ string logFile = "";
77
+ string argsUsedString = "";
78
+
79
+ foreach (string a in argsUsed)
80
+ {
81
+ argsUsedString += a + " ";
82
+ }
83
+
84
+ try
85
+ {
86
+ logFile = System.Environment.ExpandEnvironmentVariables(data);
87
+ Console.WriteLine("creating log file: " + logFile);
88
+ StreamWriter textFile = File.CreateText(logFile);
89
+ textFile.WriteLine("This is a log file created by TestExe.exe");
90
+ textFile.WriteLine("Args used: " + argsUsedString);
91
+ textFile.Close();
92
+ }
93
+ catch
94
+ {
95
+ Console.WriteLine("creating a log file failed for: {0}", logFile);
96
+ }
97
+
98
+ }
99
+ }
100
+
101
+ public class ProcessInfoTask : Task
102
+ {
103
+ public ProcessInfoTask(string Data) : base(Data) { }
104
+
105
+ public override void RunTask()
106
+ {
107
+ try
108
+ {
109
+ string processInfoXml = "";
110
+
111
+ // Get information about the process and who is running it
112
+ Process thisProc = Process.GetCurrentProcess();
113
+ string username = thisProc.StartInfo.EnvironmentVariables["username"].ToString();
114
+
115
+ int parentProcId = GetParentProcess(thisProc.Id);
116
+ Process parentProc = Process.GetProcessById(parentProcId);
117
+ string parentUsername = parentProc.StartInfo.EnvironmentVariables["username"].ToString();
118
+
119
+ int grandparentProcId = GetParentProcess(parentProc.Id);
120
+ Process grandparentProc = Process.GetProcessById(grandparentProcId);
121
+ string grandparentUsername = grandparentProc.StartInfo.EnvironmentVariables["username"].ToString();
122
+
123
+ processInfoXml += "<ProcessInfo>";
124
+ processInfoXml += " <ProcessName>" + thisProc.ProcessName + "</ProcessName>";
125
+ processInfoXml += " <Id>" + thisProc.Id.ToString() + "</Id>";
126
+ processInfoXml += " <SessionId>" + thisProc.SessionId.ToString() + "</SessionId>";
127
+ processInfoXml += " <MachineName>" + thisProc.MachineName + "</MachineName>";
128
+ // this stuff isn't set since we didn't start the process and tell it what to use. So don't bother
129
+ //processInfoXml += " <StartInfo>";
130
+ //processInfoXml += " <FileName>" + thisProc.StartInfo.FileName + "</FileName>";
131
+ //processInfoXml += " <UserName>" + thisProc.StartInfo.UserName + "</UserName>";
132
+ //processInfoXml += " <WorkingDirectory>" + thisProc.StartInfo.WorkingDirectory + "</WorkingDirectory>";
133
+ //processInfoXml += " <Arguments>" + thisProc.StartInfo.Arguments + "</Arguments>";
134
+ //processInfoXml += " </StartInfo>";
135
+ processInfoXml += " <StartTime>" + thisProc.StartTime.ToString() + "</StartTime>";
136
+ processInfoXml += " <Username>" + username + "</Username>";
137
+ processInfoXml += " <ParentProcess>";
138
+ processInfoXml += " <ProcessName>" + parentProc.ProcessName + "</ProcessName>";
139
+ processInfoXml += " <Id>" + parentProc.Id.ToString() + "</Id>";
140
+ processInfoXml += " <StartTime>" + parentProc.StartTime.ToString() + "</StartTime>";
141
+ processInfoXml += " <Username>" + parentUsername + "</Username>";
142
+ processInfoXml += " </ParentProcess>";
143
+ processInfoXml += " <GrandparentProcess>";
144
+ processInfoXml += " <ProcessName>" + grandparentProc.ProcessName + "</ProcessName>";
145
+ processInfoXml += " <Id>" + grandparentProc.Id.ToString() + "</Id>";
146
+ processInfoXml += " <StartTime>" + grandparentProc.StartTime.ToString() + "</StartTime>";
147
+ processInfoXml += " <Username>" + grandparentUsername + "</Username>";
148
+ processInfoXml += " </GrandparentProcess>";
149
+ processInfoXml += "</ProcessInfo>";
150
+
151
+ string logFile = System.Environment.ExpandEnvironmentVariables(data);
152
+ Console.WriteLine("Creating Process Info data file: " + logFile);
153
+ StreamWriter textFile = File.CreateText(logFile);
154
+ textFile.WriteLine(processInfoXml);
155
+ textFile.Close();
156
+ }
157
+ catch (Exception eX)
158
+ {
159
+ Console.WriteLine("Creating Process Info data file failed");
160
+ Console.WriteLine(eX.Message);
161
+ }
162
+
163
+
164
+ }
165
+
166
+ private static int GetParentProcess(int Id)
167
+ {
168
+ int parentPid = 0;
169
+ using (ManagementObject mo = new ManagementObject("win32_process.handle='" + Id.ToString() + "'"))
170
+ {
171
+ mo.Get();
172
+ parentPid = Convert.ToInt32(mo["ParentProcessId"]);
173
+ }
174
+ return parentPid;
175
+ }
176
+ }
177
+
178
+ public class FileExistsTask : Task
179
+ {
180
+ public FileExistsTask(string Data) : base(Data) { }
181
+
182
+ public override void RunTask()
183
+ {
184
+ string fileToExist = System.Environment.ExpandEnvironmentVariables(data);
185
+
186
+ if (!String.IsNullOrEmpty(fileToExist))
187
+ {
188
+ Console.WriteLine("Waiting for this file to exist: \"" + fileToExist + "\"");
189
+ while (!System.IO.File.Exists(fileToExist))
190
+ {
191
+ System.Threading.Thread.Sleep(250);
192
+ }
193
+ Console.WriteLine("Found: \"" + fileToExist + "\"");
194
+ }
195
+
196
+ }
197
+ }
198
+
199
+ /// <summary>
200
+ /// Task class that will create a registry key and write a name and value in it
201
+ /// </summary>
202
+ public class RegistryWriterTask : Task
203
+ {
204
+ private string hive;
205
+ private string keyPath;
206
+ private string[] keyPathArray;
207
+ private string name;
208
+ private RegistryValueKind regValueKind;
209
+ private object value;
210
+
211
+ public RegistryWriterTask(string Data) : base(Data) { }
212
+
213
+ public override void RunTask()
214
+ {
215
+ if (parseRegKeyNameTypeValue(System.Environment.ExpandEnvironmentVariables(data)))
216
+ {
217
+ RegistryKey rk = Registry.LocalMachine;
218
+
219
+ if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser;
220
+ if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig;
221
+ if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine;
222
+
223
+ foreach (string key in keyPathArray)
224
+ {
225
+ rk = rk.CreateSubKey(key, RegistryKeyPermissionCheck.ReadWriteSubTree);
226
+ }
227
+
228
+ rk.SetValue(name, value, regValueKind);
229
+ Console.WriteLine("Created registry key: '{0}' name: '{1}' value: '{2}' of type: '{3}'",
230
+ hive + "\\" + keyPath,
231
+ name,
232
+ value.ToString(),
233
+ regValueKind.ToString());
234
+ }
235
+ else
236
+ {
237
+ Console.WriteLine("Unable to write registry key.");
238
+ }
239
+
240
+ }
241
+
242
+ private bool parseRegKeyNameTypeValue(string delimittedData)
243
+ {
244
+ string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None);
245
+ if (splitString.Length != 4)
246
+ {
247
+ Console.WriteLine("Invalid regkey. Unable to parse key,name,type,value from: \"" + delimittedData + "\"");
248
+ return false;
249
+ }
250
+ else
251
+ {
252
+ keyPath = splitString[0];
253
+ name = splitString[1];
254
+ string datatype = splitString[2];
255
+ if (datatype == "DWord")
256
+ {
257
+ value = UInt32.Parse(splitString[3]);
258
+ }
259
+ else if (datatype == "QWord")
260
+ {
261
+ value = UInt64.Parse(splitString[3]);
262
+ }
263
+ else
264
+ {
265
+ value = splitString[3];
266
+ }
267
+
268
+ if (keyPath.ToUpper().StartsWith("HKLM\\"))
269
+ {
270
+ hive = "HKLM";
271
+ keyPath = keyPath.Replace("HKLM\\", "");
272
+ }
273
+ else if (keyPath.ToUpper().StartsWith("HKCC\\"))
274
+ {
275
+ hive = "HKCC";
276
+ keyPath = keyPath.Replace("HKCC\\", "");
277
+ }
278
+ else if (keyPath.ToUpper().StartsWith("HKCU\\"))
279
+ {
280
+ hive = "HKCU";
281
+ keyPath = keyPath.Replace("HKCU\\", "");
282
+ }
283
+ else
284
+ {
285
+ Console.WriteLine("Invalid regkey. Unable to determin hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]");
286
+ return false;
287
+ }
288
+ keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None);
289
+
290
+ try
291
+ {
292
+ regValueKind = (RegistryValueKind)System.Enum.Parse(typeof(RegistryValueKind), datatype);
293
+ }
294
+ catch (Exception ex)
295
+ {
296
+ Console.WriteLine("Invalid datatype. It must be: String, DWord, or QWord (case sensitive)");
297
+ Console.WriteLine(ex.Message);
298
+ return false;
299
+ }
300
+ }
301
+ return true;
302
+ }
303
+ }
304
+
305
+ /// <summary>
306
+ /// Task class that will delete a registry key value or registry key and all of its children
307
+ /// </summary>
308
+ public class RegistryDeleterTask : Task
309
+ {
310
+ private string hive;
311
+ private string keyPath;
312
+ private string[] keyPathArray;
313
+ private string name;
314
+
315
+ public RegistryDeleterTask(string Data) : base(Data) { }
316
+
317
+ public override void RunTask()
318
+ {
319
+ if (parseRegKeyName(System.Environment.ExpandEnvironmentVariables(data)))
320
+ {
321
+ try
322
+ {
323
+ RegistryKey rk = Registry.LocalMachine;
324
+
325
+ if (hive == "HKCU") rk = Microsoft.Win32.Registry.CurrentUser;
326
+ if (hive == "HKCC") rk = Microsoft.Win32.Registry.CurrentConfig;
327
+ if (hive == "HKLM") rk = Microsoft.Win32.Registry.LocalMachine;
328
+
329
+ RegistryKey rkParent = null;
330
+ foreach (string key in keyPathArray)
331
+ {
332
+ rkParent = rk;
333
+ rk = rk.OpenSubKey(key, true);
334
+ }
335
+
336
+ if (String.IsNullOrEmpty(name))
337
+ {
338
+ // delete the key and all of its children
339
+ string subkeyToDelete = keyPathArray[keyPathArray.Length - 1];
340
+ rkParent.DeleteSubKeyTree(subkeyToDelete);
341
+ Console.WriteLine("Deleted registry key: '{0}'", hive + "\\" + keyPath);
342
+ }
343
+ else
344
+ {
345
+ // just delete this value
346
+ rk.DeleteValue(name);
347
+ Console.WriteLine("Deleted registry key: '{0}' name: '{1}'", hive + "\\" + keyPath, name);
348
+ }
349
+ }
350
+ catch (Exception ex)
351
+ {
352
+ Console.WriteLine("Unable to delete registry key: '{0}'", hive + "\\" + keyPath);
353
+ Console.WriteLine(ex.Message);
354
+ }
355
+ }
356
+ else
357
+ {
358
+ Console.WriteLine("Unable to delete registry key.");
359
+ }
360
+
361
+ }
362
+
363
+ private bool parseRegKeyName(string delimittedData)
364
+ {
365
+ string[] splitString = delimittedData.Split(new string[] { "," }, StringSplitOptions.None);
366
+
367
+ if (splitString.Length > 2)
368
+ {
369
+ Console.WriteLine("Unable to parse registry key and name.");
370
+ return false;
371
+ }
372
+
373
+ keyPath = splitString[0];
374
+ if (splitString.Length == 2)
375
+ {
376
+ name = splitString[1];
377
+ }
378
+
379
+ if (keyPath.ToUpper().StartsWith("HKLM\\"))
380
+ {
381
+ hive = "HKLM";
382
+ keyPath = keyPath.Replace("HKLM\\", "");
383
+ }
384
+ else if (keyPath.ToUpper().StartsWith("HKCC\\"))
385
+ {
386
+ hive = "HKCC";
387
+ keyPath = keyPath.Replace("HKCC\\", "");
388
+ }
389
+ else if (keyPath.ToUpper().StartsWith("HKCU\\"))
390
+ {
391
+ hive = "HKCU";
392
+ keyPath = keyPath.Replace("HKCU\\", "");
393
+ }
394
+ else
395
+ {
396
+ Console.WriteLine("Invalid regkey. Unable to determine hive. regkey must start with either: [HKLM], [HKCU], or [HKCC]");
397
+ return false;
398
+ }
399
+ keyPathArray = keyPath.Split(new string[] { "\\" }, StringSplitOptions.None);
400
+ return true;
401
+ }
402
+ }
403
+
404
+ public class TaskParser
405
+ {
406
+
407
+ public static List<Task> ParseTasks(string[] args)
408
+ {
409
+ List<Task> tasks = new List<Task>();
410
+
411
+ try
412
+ {
413
+ // for invalid args. return empty list
414
+ if (args.Length % 2 == 0)
415
+ {
416
+ Task t;
417
+
418
+ for (int i = 0; i < args.Length; i += 2)
419
+ {
420
+ switch (args[i].ToLower())
421
+ {
422
+ case "/ec":
423
+ t = new ExitCodeTask(args[i + 1]);
424
+ tasks.Add(t);
425
+ break;
426
+ case "/s":
427
+ t = new SleepTask(args[i + 1]);
428
+ tasks.Add(t);
429
+ break;
430
+ case "/sr":
431
+ t = new SleepRandomTask(args[i + 1]);
432
+ tasks.Add(t);
433
+ break;
434
+ case "/log":
435
+ t = new LogTask(args[i + 1], args);
436
+ tasks.Add(t);
437
+ break;
438
+ case "/pinfo":
439
+ t = new ProcessInfoTask(args[i + 1]);
440
+ tasks.Add(t);
441
+ break;
442
+ case "/fe":
443
+ t = new FileExistsTask(args[i + 1]);
444
+ tasks.Add(t);
445
+ break;
446
+ case "/regw":
447
+ t = new RegistryWriterTask(args[i + 1]);
448
+ tasks.Add(t);
449
+ break;
450
+ case "/regd":
451
+ t = new RegistryDeleterTask(args[i + 1]);
452
+ tasks.Add(t);
453
+ break;
454
+
455
+ default:
456
+ Console.WriteLine("Error: Invalid switch specified.");
457
+ return new List<Task>();
458
+ }
459
+ }
460
+ }
461
+ }
462
+ catch
463
+ {
464
+ Console.WriteLine("Error: Invalid switch data specified. Couldn't parse the data.");
465
+ return new List<Task>();
466
+ }
467
+
468
+ return tasks;
469
+ }
470
+ }
471
+}
src/TestExe/TestExe.csproj
new
+17
@@ -0,0 +1,17 @@
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 Sdk="Microsoft.NET.Sdk">
5
+ <PropertyGroup>
6
+ <TargetFrameworks>net35</TargetFrameworks>
7
+ <AssemblyName>TestExe</AssemblyName>
8
+ <RootNamespace>TestExe</RootNamespace>
9
+ <OutputType>Exe</OutputType>
10
+ <DebugType>embedded</DebugType>
11
+ <RuntimeIdentifier>win-x86</RuntimeIdentifier>
12
+ </PropertyGroup>
13
+
14
+ <ItemGroup>
15
+ <Reference Include="System.Management" />
16
+ </ItemGroup>
17
+</Project>
\ No newline at end of file
src/TestExe/app.config
new
+10
@@ -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
+
5
+<configuration>
6
+ <startup>
7
+ <supportedRuntime version="v4.0" />
8
+ <supportedRuntime version="v2.0.50727" />
9
+ </startup>
10
+</configuration>
src/WixTestTools/BundleInstaller.cs
+3
@@ -12,12 +12,15 @@ namespace WixTestTools
12
{
13
this.Bundle = Path.Combine(testContext.TestDataFolder, $"{name}.exe");
14
this.BundlePdb = Path.Combine(testContext.TestDataFolder, $"{name}.wixpdb");
15
+ this.TestContext = testContext;
16
this.TestGroupName = testContext.TestGroupName;
17
this.TestName = testContext.TestName;
18
}
19
20
public string Bundle { get; }
21
22
+ private WixTestContext TestContext { get; }
23
+
24
public string TestGroupName { get; }
25
26
public string TestName { get; }
src/WixTestTools/BundleRegistration.cs
+12
-2
@@ -7,7 +7,8 @@ namespace WixTestTools
7
8
public class BundleRegistration
9
{
10
- public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
10
+ public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
11
+ public const string BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE = "SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
12
public const string BURN_REGISTRATION_REGISTRY_BUNDLE_CACHE_PATH = "BundleCachePath";
13
public const string BURN_REGISTRATION_REGISTRY_BUNDLE_ADDON_CODE = "BundleAddonCode";
14
public const string BURN_REGISTRATION_REGISTRY_BUNDLE_DETECT_CODE = "BundleDetectCode";
@@ -89,13 +90,22 @@ namespace WixTestTools
90
91
public static bool TryGetPerMachineBundleRegistrationById(string bundleId, out BundleRegistration registration)
92
{
92
- var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}";
93
+ var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY_WOW6432NODE}\\{bundleId}";
94
using var registrationKey = Registry.LocalMachine.OpenSubKey(registrationKeyPath);
95
var success = registrationKey != null;
96
registration = success ? GetBundleRegistration(registrationKey) : null;
97
return success;
98
}
99
100
+ public static bool TryGetPerUserBundleRegistrationById(string bundleId, out BundleRegistration registration)
101
+ {
102
+ var registrationKeyPath = $"{BURN_REGISTRATION_REGISTRY_UNINSTALL_KEY}\\{bundleId}";
103
+ using var registrationKey = Registry.CurrentUser.OpenSubKey(registrationKeyPath);
104
+ var success = registrationKey != null;
105
+ registration = success ? GetBundleRegistration(registrationKey) : null;
106
+ return success;
107
+ }
108
+
109
private static BundleRegistration GetBundleRegistration(RegistryKey idKey)
110
{
111
var registration = new BundleRegistration();
src/WixTestTools/BundleVerifier.cs
+55
-10
@@ -33,31 +33,46 @@ namespace WixTestTools
33
return this.BundleSymbol;
34
}
35
36
- public string GetPackageCachePathForCacheId(string cacheId)
36
+ public string GetPackageCachePathForCacheId(string cacheId, bool perMachine)
37
{
38
- using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH);
39
- var redirectedCachePath = policyKey?.GetValue("PackageCache") as string;
40
- var cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME);
38
+ string cachePath;
39
+ if (perMachine)
40
+ {
41
+ using var policyKey = Registry.LocalMachine.OpenSubKey(FULL_BURN_POLICY_REGISTRY_PATH);
42
+ var redirectedCachePath = policyKey?.GetValue("PackageCache") as string;
43
+ cachePath = redirectedCachePath ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), PACKAGE_CACHE_FOLDER_NAME);
44
+ }
45
+ else
46
+ {
47
+ cachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), PACKAGE_CACHE_FOLDER_NAME);
48
+ }
49
return Path.Combine(cachePath, cacheId);
50
}
51
52
public string GetExpectedCachedBundlePath()
53
{
54
var bundleSymbol = this.GetBundleSymbol();
47
- var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId);
55
+ var cachePath = this.GetPackageCachePathForCacheId(bundleSymbol.BundleId, bundleSymbol.PerMachine);
56
return Path.Combine(cachePath, Path.GetFileName(this.Bundle));
57
}
58
51
- public bool TryGetPerMachineRegistration(out BundleRegistration registration)
59
+ public bool TryGetRegistration(out BundleRegistration registration)
60
{
61
var bundleSymbol = this.GetBundleSymbol();
62
var bundleId = bundleSymbol.BundleId;
55
- return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration);
63
+ if (bundleSymbol.PerMachine)
64
+ {
65
+ return BundleRegistration.TryGetPerMachineBundleRegistrationById(bundleId, out registration);
66
+ }
67
+ else
68
+ {
69
+ return BundleRegistration.TryGetPerUserBundleRegistrationById(bundleId, out registration);
70
+ }
71
}
72
73
public string VerifyRegisteredAndInPackageCache()
74
{
60
- Assert.True(this.TryGetPerMachineRegistration(out var registration));
75
+ Assert.True(this.TryGetRegistration(out var registration));
76
77
Assert.NotNull(registration.CachePath);
78
Assert.True(File.Exists(registration.CachePath));
@@ -76,7 +91,7 @@ namespace WixTestTools
91
92
public void VerifyUnregisteredAndRemovedFromPackageCache(string cachedBundlePath)
93
{
79
- Assert.False(this.TryGetPerMachineRegistration(out _));
94
+ Assert.False(this.TryGetRegistration(out _));
95
Assert.False(File.Exists(cachedBundlePath));
96
}
97
@@ -86,11 +101,41 @@ namespace WixTestTools
101
var intermediate = Intermediate.Load(wixOutput);
102
var section = intermediate.Sections.Single();
103
var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId);
89
- var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId);
104
+ var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes);
105
if (Directory.Exists(cachePath))
106
{
107
Directory.Delete(cachePath, true);
108
}
109
}
110
+
111
+ public void VerifyPackageIsCached(string packageId)
112
+ {
113
+ using var wixOutput = WixOutput.Read(this.BundlePdb);
114
+ var intermediate = Intermediate.Load(wixOutput);
115
+ var section = intermediate.Sections.Single();
116
+ var packageSymbol = section.Symbols.OfType<WixBundlePackageSymbol>().Single(p => p.Id.Id == packageId);
117
+ var cachePath = this.GetPackageCachePathForCacheId(packageSymbol.CacheId, packageSymbol.PerMachine == YesNoDefaultType.Yes);
118
+ Assert.True(Directory.Exists(cachePath));
119
+ }
120
+
121
+ public void VerifyExeTestRegistryRootDeleted(string name)
122
+ {
123
+ using var testRegistryRoot = this.TestContext.GetTestRegistryRoot(name);
124
+ if (testRegistryRoot != null)
125
+ {
126
+ var actualValue = testRegistryRoot.GetValue("Version") as string;
127
+ Assert.Null(actualValue);
128
+ }
129
+ }
130
+
131
+ public void VerifyExeTestRegistryValue(string name, string expectedValue)
132
+ {
133
+ using (var root = this.TestContext.GetTestRegistryRoot(name))
134
+ {
135
+ Assert.NotNull(root);
136
+ var actualValue = root.GetValue("Version") as string;
137
+ Assert.Equal(expectedValue, actualValue);
138
+ }
139
+ }
140
}
141
}
src/WixTestTools/MsiUtilities.cs
+20
@@ -2,6 +2,7 @@
2
3
namespace WixTestTools
4
{
5
+ using System;
6
using WixToolset.Dtf.WindowsInstaller;
7
8
public class MsiUtilities
@@ -23,5 +24,24 @@ namespace WixTestTools
24
}
25
return false;
26
}
27
+
28
+ /// <summary>
29
+ /// Return true if it finds the given productcode in system with the specified version otherwise it returns false
30
+ /// </summary>
31
+ /// <param name="prodCode"></param>
32
+ /// <param name="prodVersion"></param>
33
+ /// <returns></returns>
34
+ public static bool IsProductInstalledWithVersion(string prodCode, Version prodVersion)
35
+ {
36
+ //look in all user's products (both per-machine and per-user)
37
+ foreach (ProductInstallation product in ProductInstallation.GetProducts(null, "s-1-1-0", UserContexts.All))
38
+ {
39
+ if (product.ProductCode == prodCode && product.ProductVersion == prodVersion)
40
+ {
41
+ return true;
42
+ }
43
+ }
44
+ return false;
45
+ }
46
}
47
}
src/WixTestTools/PackageVerifier.cs
+7
@@ -58,6 +58,13 @@ namespace WixTestTools
58
Assert.Equal(installed, MsiUtilities.IsProductInstalled(productCode));
59
}
60
61
+ public void VerifyInstalledWithVersion(bool installed)
62
+ {
63
+ var productCode = this.GetProperty("ProductCode");
64
+ Version prodVersion = new Version(this.GetProperty("ProductVersion"));
65
+ Assert.Equal(installed, MsiUtilities.IsProductInstalledWithVersion(productCode, prodVersion));
66
+ }
67
+
68
public void DeleteTestRegistryValue(string name)
69
{
70
using (var root = this.TestContext.GetTestRegistryRoot())
src/WixTestTools/WixTestTools.csproj
+1
-1
@@ -11,7 +11,7 @@
11
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
12
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
13
<PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" />
14
- <PackageReference Include="WixToolset.Data" Version="4.0.196" />
14
+ <PackageReference Include="WixToolset.Data" Version="4.0.198" />
15
<PackageReference Include="WixToolset.Mba.Core" Version="4.0.51" />
16
</ItemGroup>
17
src/WixToolsetTest.BurnE2E/DependencyTests.cs
+578
-8
@@ -2,6 +2,9 @@
2
3
namespace WixToolsetTest.BurnE2E
4
{
5
+ using System;
6
+ using WixTestTools;
7
+ using WixToolset.Mba.Core;
8
using Xunit;
9
using Xunit.Abstractions;
10
@@ -12,27 +15,594 @@ namespace WixToolsetTest.BurnE2E
15
[Fact]
16
public void CanKeepSameExactPackageAfterUpgradingBundle()
17
{
15
- var packageA = this.CreatePackageInstaller("PackageF");
16
- var bundleAv1 = this.CreateBundleInstaller("BundleKv1");
17
- var bundleAv2 = this.CreateBundleInstaller("BundleKv2");
18
+ var packageF = this.CreatePackageInstaller("PackageF");
19
+ var bundleKv1 = this.CreateBundleInstaller("BundleKv1");
20
+ var bundleKv2 = this.CreateBundleInstaller("BundleKv2");
21
+
22
+ packageF.VerifyInstalled(false);
23
+
24
+ bundleKv1.Install();
25
+ bundleKv1.VerifyRegisteredAndInPackageCache();
26
+
27
+ packageF.VerifyInstalled(true);
28
+
29
+ bundleKv2.Install();
30
+ bundleKv2.VerifyRegisteredAndInPackageCache();
31
+ bundleKv1.VerifyUnregisteredAndRemovedFromPackageCache();
32
+
33
+ packageF.VerifyInstalled(true);
34
+
35
+ bundleKv2.VerifyPackageIsCached("PackageF");
36
+
37
+ bundleKv2.Uninstall();
38
+ bundleKv2.VerifyUnregisteredAndRemovedFromPackageCache();
39
+
40
+ packageF.VerifyInstalled(false);
41
+ }
42
+
43
+ [Fact (Skip = "https://github.com/wixtoolset/issues/issues/6387")]
44
+ public void CanKeepSameExactPackageAfterUpgradingBundleWithSlipstreamedPatch()
45
+ {
46
+ var originalVersion = "1.0.0.0";
47
+ var patchedVersion = "1.0.1.0";
48
+ var testRegistryValue = "PackageA";
49
+ var testRegistryValueExe = "ExeA";
50
+
51
+ var packageA = this.CreatePackageInstaller("PackageAv1");
52
+ var bundleA = this.CreateBundleInstaller("BundleAv1");
53
+ var bundleC = this.CreateBundleInstaller("BundleC");
54
55
packageA.VerifyInstalled(false);
56
57
+ bundleA.Install();
58
+ bundleA.VerifyRegisteredAndInPackageCache();
59
+
60
+ packageA.VerifyInstalled(true);
61
+ packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion);
62
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, originalVersion);
63
+
64
+ // Verify https://github.com/wixtoolset/issues/issues/3294 - Uninstalling bundle registers a dependency on a package
65
+ bundleC.Install();
66
+ bundleC.VerifyRegisteredAndInPackageCache();
67
+ bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
68
+
69
+ packageA.VerifyInstalled(true);
70
+ packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion);
71
+ bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
72
+
73
+ // Verify https://github.com/wixtoolset/issues/issues/2915 - Update bundle removes previously cached MSIs
74
+ bundleC.Repair();
75
+
76
+ bundleC.Uninstall();
77
+ bundleC.VerifyUnregisteredAndRemovedFromPackageCache();
78
+
79
+ packageA.VerifyInstalled(false);
80
+ }
81
+
82
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/exea")]
83
+ public void CanKeepUpgradedPackageAfterUninstallUpgradedBundle()
84
+ {
85
+ var testRegistryValueExe = "ExeA";
86
+
87
+ var packageAv1 = this.CreatePackageInstaller("PackageAv1");
88
+ var packageAv101 = this.CreatePackageInstaller("PackageAv1_0_1");
89
+ var packageB = this.CreatePackageInstaller("PackageB");
90
+ var bundleAv1 = this.CreateBundleInstaller("BundleAv1");
91
+ var bundleAv101 = this.CreateBundleInstaller("BundleAv1_0_1");
92
+ var bundleB = this.CreateBundleInstaller("BundleB");
93
+
94
+ packageAv1.VerifyInstalledWithVersion(false);
95
+ packageAv101.VerifyInstalledWithVersion(false);
96
+ packageB.VerifyInstalled(false);
97
+
98
bundleAv1.Install();
99
bundleAv1.VerifyRegisteredAndInPackageCache();
100
24
- packageA.VerifyInstalled(true);
101
+ packageAv1.VerifyInstalledWithVersion(true);
102
+ bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
103
+
104
+ bundleB.Install();
105
+ bundleB.VerifyRegisteredAndInPackageCache();
106
26
- bundleAv2.Install();
27
- bundleAv2.VerifyRegisteredAndInPackageCache();
107
+ packageAv1.VerifyInstalledWithVersion(true);
108
+ bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
109
+ packageB.VerifyInstalled(true);
110
+
111
+ bundleAv101.Install();
112
+ bundleAv101.VerifyRegisteredAndInPackageCache();
113
bundleAv1.VerifyUnregisteredAndRemovedFromPackageCache();
114
115
+ packageAv1.VerifyInstalledWithVersion(false);
116
+ packageAv101.VerifyInstalledWithVersion(true);
117
+ bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0");
118
+
119
+ bundleAv101.Uninstall();
120
+ bundleAv101.VerifyUnregisteredAndRemovedFromPackageCache();
121
+
122
+ packageAv101.VerifyInstalledWithVersion(true);
123
+ bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.1.0");
124
+ }
125
+
126
+#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES
127
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")]
128
+#else
129
+ [Fact(Skip = "addon/patch related bundle")]
130
+#endif
131
+ public void CanMinorUpgradeDependencyPackageFromPatchBundle()
132
+ {
133
+ var originalVersion = "1.0.0.0";
134
+ var patchedVersion = "1.0.1.0";
135
+ var testRegistryValue = "PackageA";
136
+
137
+ var packageA = this.CreatePackageInstaller("PackageAv1");
138
+ var packageBv1 = this.CreatePackageInstaller("PackageBv1");
139
+ var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1");
140
+ var bundleJ = this.CreateBundleInstaller("BundleJ");
141
+ var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch");
142
+
143
+ packageA.VerifyInstalled(false);
144
+ packageBv1.VerifyInstalled(false);
145
+ packageBv101.VerifyInstalled(false);
146
+
147
+ bundleJ.Install();
148
+ bundleJ.VerifyRegisteredAndInPackageCache();
149
+
150
+ packageA.VerifyInstalled(true);
151
+ packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion);
152
+ packageBv1.VerifyInstalled(true);
153
+
154
+ bundleJ_Patch.Install();
155
+ bundleJ_Patch.VerifyRegisteredAndInPackageCache();
156
+
157
+ packageA.VerifyInstalled(true);
158
+ packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion);
159
+ packageBv1.VerifyInstalled(false);
160
+ packageBv101.VerifyInstalled(true);
161
+
162
+ bundleJ.Uninstall();
163
+ bundleJ.VerifyUnregisteredAndRemovedFromPackageCache();
164
+ bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache();
165
+
166
+ packageA.VerifyInstalled(false);
167
+ packageBv1.VerifyInstalled(false);
168
+ packageBv101.VerifyInstalled(false);
169
+ }
170
+
171
+#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES
172
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")]
173
+#else
174
+ [Fact(Skip = "addon/patch related bundle")]
175
+#endif
176
+ public void CanMinorUpgradeDependencyPackageFromPatchBundleThenUninstallToRestoreBase()
177
+ {
178
+ var originalVersion = "1.0.0.0";
179
+ var patchedVersion = "1.0.1.0";
180
+ var testRegistryValue = "PackageA";
181
+
182
+ var packageA = this.CreatePackageInstaller("PackageAv1");
183
+ var packageBv1 = this.CreatePackageInstaller("PackageBv1");
184
+ var packageBv101 = this.CreatePackageInstaller("PackageBv1_0_1");
185
+ var bundleJ = this.CreateBundleInstaller("BundleJ");
186
+ var bundleJ_Patch = this.CreateBundleInstaller("BundleJ_Patch");
187
+
188
+ packageA.VerifyInstalled(false);
189
+ packageBv1.VerifyInstalled(false);
190
+ packageBv101.VerifyInstalled(false);
191
+
192
+ bundleJ.Install();
193
+ bundleJ.VerifyRegisteredAndInPackageCache();
194
+
195
+ packageA.VerifyInstalled(true);
196
+ packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion);
197
+ packageBv1.VerifyInstalled(true);
198
+
199
+ bundleJ_Patch.Install();
200
+ bundleJ_Patch.VerifyRegisteredAndInPackageCache();
201
+
202
+ packageA.VerifyInstalled(true);
203
+ packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion);
204
+ packageBv1.VerifyInstalled(false);
205
+ packageBv101.VerifyInstalled(true);
206
+
207
+ bundleJ_Patch.Uninstall();
208
+ bundleJ_Patch.VerifyUnregisteredAndRemovedFromPackageCache();
209
+
210
packageA.VerifyInstalled(true);
211
+ packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion);
212
+ packageBv1.VerifyInstalled(true);
213
+ packageBv101.VerifyInstalled(false);
214
+
215
+ bundleJ.Uninstall();
216
+ bundleJ.VerifyUnregisteredAndRemovedFromPackageCache();
217
+
218
+ packageA.VerifyInstalled(false);
219
+ packageBv1.VerifyInstalled(false);
220
+ packageBv101.VerifyInstalled(false);
221
+ }
222
+
223
+#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES
224
+ [Fact]
225
+#else
226
+ [Fact(Skip = "addon/patch related bundle")]
227
+#endif
228
+ public void CanUninstallBaseWithAddOnsWhenAllSharePackages()
229
+ {
230
+ var testRegistryValueExe = "ExeA";
231
+
232
+ var packageA = this.CreatePackageInstaller("PackageAv1");
233
+ var packageB = this.CreatePackageInstaller("PackageB");
234
+ var bundleF = this.CreateBundleInstaller("BundleF");
235
+ var bundleF_AddOnA = this.CreateBundleInstaller("BundleF_AddOnA");
236
+ var bundleF_AddOnB = this.CreateBundleInstaller("BundleF_AddOnB");
237
+
238
+ packageA.VerifyInstalled(false);
239
+ packageB.VerifyInstalled(false);
240
+
241
+ bundleF.Install();
242
+ bundleF.VerifyRegisteredAndInPackageCache();
243
+
244
+ packageA.VerifyInstalled(true);
245
+ packageB.VerifyInstalled(true);
246
+
247
+ bundleF_AddOnA.Install();
248
+ bundleF_AddOnA.VerifyRegisteredAndInPackageCache();
249
+
250
+ packageA.VerifyInstalled(true);
251
+ bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
252
+ packageB.VerifyInstalled(true);
253
+
254
+ bundleF_AddOnB.Install();
255
+ bundleF_AddOnB.VerifyRegisteredAndInPackageCache();
256
+
257
+ packageA.VerifyInstalled(true);
258
+ bundleF.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
259
+ packageB.VerifyInstalled(true);
260
+
261
+ bundleF.Uninstall();
262
+ bundleF.VerifyUnregisteredAndRemovedFromPackageCache();
263
+ bundleF_AddOnA.VerifyUnregisteredAndRemovedFromPackageCache();
264
+ bundleF_AddOnB.VerifyUnregisteredAndRemovedFromPackageCache();
265
+
266
+ packageA.VerifyInstalled(false);
267
+ bundleF.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
268
+ packageB.VerifyInstalled(false);
269
+ }
270
+
271
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")]
272
+ public void CanUninstallDependencyPackagesWithBundlesUninstalledInFifoOrder()
273
+ {
274
+ var testRegistryValueExe = "ExeA";
275
32
- bundleAv2.Uninstall();
33
- bundleAv2.VerifyUnregisteredAndRemovedFromPackageCache();
276
+ var packageA = this.CreatePackageInstaller("PackageAv1");
277
+ var packageB = this.CreatePackageInstaller("PackageB");
278
+ var bundleA = this.CreateBundleInstaller("BundleAv1");
279
+ var bundleB = this.CreateBundleInstaller("BundleB");
280
281
packageA.VerifyInstalled(false);
282
+ packageB.VerifyInstalled(false);
283
+
284
+ bundleA.Install();
285
+ bundleA.VerifyRegisteredAndInPackageCache();
286
+
287
+ packageA.VerifyInstalled(true);
288
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
289
+
290
+ bundleB.Install();
291
+ bundleB.VerifyRegisteredAndInPackageCache();
292
+
293
+ packageA.VerifyInstalled(true);
294
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
295
+ packageB.VerifyInstalled(true);
296
+
297
+ bundleA.Uninstall();
298
+ bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
299
+
300
+ packageA.VerifyInstalled(true);
301
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
302
+ packageB.VerifyInstalled(true);
303
+
304
+ bundleB.Uninstall();
305
+ bundleB.VerifyUnregisteredAndRemovedFromPackageCache();
306
+
307
+ packageA.VerifyInstalled(false);
308
+ bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
309
+ packageB.VerifyInstalled(false);
310
+ }
311
+
312
+ [Fact]
313
+ public void CanUninstallDependencyPackagesWithBundlesUninstalledInReverseOrder()
314
+ {
315
+ var packageA = this.CreatePackageInstaller("PackageAv1");
316
+ var packageB = this.CreatePackageInstaller("PackageB");
317
+ var bundleA = this.CreateBundleInstaller("BundleAv1");
318
+ var bundleB = this.CreateBundleInstaller("BundleB");
319
+
320
+ packageA.VerifyInstalled(false);
321
+ packageB.VerifyInstalled(false);
322
+
323
+ bundleA.Install();
324
+ bundleA.VerifyRegisteredAndInPackageCache();
325
+
326
+ packageA.VerifyInstalled(true);
327
+
328
+ bundleB.Install();
329
+ bundleB.VerifyRegisteredAndInPackageCache();
330
+
331
+ packageA.VerifyInstalled(true);
332
+ packageB.VerifyInstalled(true);
333
+
334
+ bundleB.Uninstall();
335
+ bundleB.VerifyUnregisteredAndRemovedFromPackageCache();
336
+
337
+ packageA.VerifyInstalled(true);
338
+
339
+ bundleA.Uninstall();
340
+ bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
341
+
342
+ packageA.VerifyInstalled(false);
343
+ packageB.VerifyInstalled(false);
344
+ }
345
+
346
+#if SUPPORT_ADDON_AND_PATCH_RELATED_BUNDLES
347
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6387")]
348
+#else
349
+ [Fact(Skip = "addon/patch related bundle")]
350
+#endif
351
+ public void CanUpgradePatchBundleWithAdditionalPatch()
352
+ {
353
+ var originalVersion = "1.0.0.0";
354
+ var patchedVersion = "1.0.1.0";
355
+ var patchedVersion2 = "1.0.2.0";
356
+ var testRegistryValue = "PackageA";
357
+
358
+ var packageA = this.CreatePackageInstaller("PackageAv1");
359
+ var packageB = this.CreatePackageInstaller("PackageBv1");
360
+ var bundleF = this.CreateBundleInstaller("BundleJ");
361
+ var bundleF_PatchAv101 = this.CreateBundleInstaller("BundleF_PatchAv1_0_1");
362
+ var bundleF_PatchAv102 = this.CreateBundleInstaller("BundleF_PatchAv1_0_2");
363
+
364
+ packageA.VerifyInstalled(false);
365
+ packageB.VerifyInstalled(false);
366
+
367
+ bundleF.Install();
368
+ bundleF.VerifyRegisteredAndInPackageCache();
369
+
370
+ packageA.VerifyInstalled(true);
371
+ packageA.VerifyTestRegistryValue(testRegistryValue, originalVersion);
372
+ packageB.VerifyInstalled(true);
373
+
374
+ bundleF_PatchAv101.Install();
375
+ bundleF_PatchAv101.VerifyRegisteredAndInPackageCache();
376
+
377
+ packageA.VerifyInstalled(true);
378
+ packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion);
379
+ packageB.VerifyInstalled(false);
380
+
381
+ bundleF_PatchAv102.Install();
382
+ bundleF_PatchAv102.VerifyRegisteredAndInPackageCache();
383
+
384
+ packageA.VerifyInstalled(true);
385
+ packageA.VerifyTestRegistryValue(testRegistryValue, patchedVersion2);
386
+ packageB.VerifyInstalled(false);
387
+
388
+ bundleF.Uninstall();
389
+ bundleF.VerifyUnregisteredAndRemovedFromPackageCache();
390
+ bundleF_PatchAv101.VerifyUnregisteredAndRemovedFromPackageCache();
391
+ bundleF_PatchAv102.VerifyUnregisteredAndRemovedFromPackageCache();
392
+
393
+ packageA.VerifyInstalled(false);
394
+ packageB.VerifyInstalled(false);
395
+ }
396
+
397
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6388")]
398
+ public void DoesntRegisterDependencyOnPackageNotSelectedForInstall()
399
+ {
400
+ var testRegistryValueExe = "ExeA";
401
+
402
+ var packageA = this.CreatePackageInstaller("PackageAv1");
403
+ var packageB = this.CreatePackageInstaller("PackageB");
404
+ var bundleA = this.CreateBundleInstaller("BundleAv1");
405
+ var bundleB = this.CreateBundleInstaller("BundleB");
406
+ var testBAController = this.CreateTestBAController();
407
+
408
+ packageA.VerifyInstalled(false);
409
+ packageB.VerifyInstalled(false);
410
+
411
+ bundleA.Install();
412
+ bundleA.VerifyRegisteredAndInPackageCache();
413
+
414
+ packageA.VerifyInstalled(true);
415
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
416
+
417
+ // Verify https://github.com/wixtoolset/issues/issues/3456 - Dependency registered on package though unselected to instal
418
+ testBAController.SetPackageRequestedState("PackageA", RequestState.None);
419
+ testBAController.SetPackageRequestedState("PackageB", RequestState.None);
420
+
421
+ bundleB.Install();
422
+ bundleB.VerifyRegisteredAndInPackageCache();
423
+
424
+ packageA.VerifyInstalled(true);
425
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
426
+ packageB.VerifyInstalled(false);
427
+
428
+ bundleA.Uninstall();
429
+ bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
430
+
431
+ packageA.VerifyInstalled(false);
432
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
433
+ packageB.VerifyInstalled(false);
434
+
435
+ bundleB.Uninstall();
436
+ bundleB.VerifyUnregisteredAndRemovedFromPackageCache();
437
+
438
+ packageA.VerifyInstalled(false);
439
+ bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
440
+ packageB.VerifyInstalled(false);
441
+ }
442
+
443
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/3516")]
444
+ public void DoesntRollbackPackageInstallIfPreexistingDependents()
445
+ {
446
+ var packageA = this.CreatePackageInstaller("PackageAv1");
447
+ var packageC = this.CreatePackageInstaller("PackageC");
448
+ var bundleE = this.CreateBundleInstaller("BundleE");
449
+ var bundleL = this.CreateBundleInstaller("BundleL");
450
+ var testBAController = this.CreateTestBAController();
451
+
452
+ packageA.VerifyInstalled(false);
453
+ packageC.VerifyInstalled(false);
454
+
455
+ // Make PackageC fail.
456
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10);
457
+
458
+ bundleE.Install();
459
+ bundleE.VerifyRegisteredAndInPackageCache();
460
+
461
+ packageA.VerifyInstalled(true);
462
+ packageC.VerifyInstalled(false);
463
+
464
+ // Make PackageC install then rollback.
465
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", null);
466
+ testBAController.SetPackageCancelOnProgressAtProgress("PackageC", 10);
467
+
468
+ bundleL.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_USEREXIT);
469
+ bundleL.VerifyUnregisteredAndRemovedFromPackageCache();
470
+
471
+ packageA.VerifyInstalled(true);
472
+ packageC.VerifyInstalled(true);
473
+
474
+ testBAController.SetPackageCancelOnProgressAtProgress("PackageC", null);
475
+
476
+ bundleE.Uninstall();
477
+ bundleE.VerifyUnregisteredAndRemovedFromPackageCache();
478
+
479
+ packageA.VerifyInstalled(false);
480
+ packageC.VerifyInstalled(false);
481
+ }
482
+
483
+ [Fact]
484
+ public void RegistersDependencyOnFailedNonVitalPackages()
485
+ {
486
+ var packageA = this.CreatePackageInstaller("PackageAv1");
487
+ var packageC = this.CreatePackageInstaller("PackageC");
488
+ var bundleE = this.CreateBundleInstaller("BundleE");
489
+ var bundleL = this.CreateBundleInstaller("BundleL");
490
+ var testBAController = this.CreateTestBAController();
491
+
492
+ packageA.VerifyInstalled(false);
493
+ packageC.VerifyInstalled(false);
494
+
495
+ // Make PackageC fail.
496
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", 10);
497
+
498
+ // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (install)
499
+ bundleE.Install();
500
+ bundleE.VerifyRegisteredAndInPackageCache();
501
+
502
+ packageA.VerifyInstalled(true);
503
+ packageC.VerifyInstalled(false);
504
+
505
+ // Verify https://github.com/wixtoolset/issues/issues/3406 - Non-vital failure result in bundle failure (repair)
506
+ bundleE.Repair();
507
+ bundleE.VerifyRegisteredAndInPackageCache();
508
+
509
+ packageA.VerifyInstalled(true);
510
+ packageC.VerifyInstalled(false);
511
+
512
+ testBAController.SetPackageCancelExecuteAtProgress("PackageC", null);
513
+
514
+ bundleL.Install();
515
+ bundleL.VerifyRegisteredAndInPackageCache();
516
+
517
+ packageA.VerifyInstalled(true);
518
+ packageC.VerifyInstalled(true);
519
+
520
+ // Verify https://github.com/wixtoolset/issues/issues/3516 - Burn registers dependency on failed packages
521
+ bundleL.Uninstall();
522
+ bundleL.VerifyUnregisteredAndRemovedFromPackageCache();
523
+
524
+ packageA.VerifyInstalled(true);
525
+ packageC.VerifyInstalled(true);
526
+
527
+ bundleE.Uninstall();
528
+ bundleE.VerifyUnregisteredAndRemovedFromPackageCache();
529
+
530
+ packageA.VerifyInstalled(false);
531
+ packageC.VerifyInstalled(false);
532
+ }
533
+
534
+ [Fact]
535
+ public void RemovesDependencyDuringUpgradeRollback()
536
+ {
537
+ var testRegistryValueExe = "ExeA";
538
+
539
+ var packageA = this.CreatePackageInstaller("PackageAv1");
540
+ var bundleA = this.CreateBundleInstaller("BundleAv1");
541
+ var bundleD = this.CreateBundleInstaller("BundleD");
542
+
543
+ packageA.VerifyInstalled(false);
544
+ bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
545
+
546
+ bundleA.Install();
547
+ bundleA.VerifyRegisteredAndInPackageCache();
548
+
549
+ packageA.VerifyInstalled(true);
550
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
551
+
552
+ // Verify https://github.com/wixtoolset/issues/issues/3341 - pkg dependecy not removed in rollback if pkg already present
553
+ bundleD.Install((int)MSIExec.MSIExecReturnCode.ERROR_INSTALL_FAILURE);
554
+ bundleD.VerifyUnregisteredAndRemovedFromPackageCache();
555
+
556
+ packageA.VerifyInstalled(true);
557
+ bundleA.VerifyExeTestRegistryValue(testRegistryValueExe, "1.0.0.0");
558
+
559
+ bundleA.Uninstall();
560
+ bundleA.VerifyUnregisteredAndRemovedFromPackageCache();
561
+
562
+ packageA.VerifyInstalled(false);
563
+ bundleA.VerifyExeTestRegistryRootDeleted(testRegistryValueExe);
564
+ }
565
+
566
+ [Fact]
567
+ public void SkipsCrossScopeDependencyRegistration()
568
+ {
569
+ var packageA = this.CreatePackageInstaller("PackageAv1");
570
+ var packageDv1 = this.CreatePackageInstaller("PackageDv1");
571
+ var packageDv2 = this.CreatePackageInstaller("PackageDv2");
572
+ var bundleHv1 = this.CreateBundleInstaller("BundleHv1");
573
+ var bundleHv2 = this.CreateBundleInstaller("BundleHv2");
574
+
575
+ packageA.VerifyInstalled(false);
576
+ packageDv1.VerifyInstalled(false);
577
+ packageDv2.VerifyInstalled(false);
578
+
579
+ var bundleHv1InstallLogFilePath = bundleHv1.Install();
580
+ bundleHv1.VerifyRegisteredAndInPackageCache();
581
+
582
+ packageA.VerifyInstalled(true);
583
+ packageDv1.VerifyInstalled(true);
584
+
585
+ Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv1InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine"));
586
+
587
+ var bundleHv2InstallLogFilePath = bundleHv2.Install();
588
+ bundleHv2.VerifyRegisteredAndInPackageCache();
589
+ bundleHv1.VerifyUnregisteredAndRemovedFromPackageCache();
590
+
591
+ packageA.VerifyInstalled(true);
592
+ packageDv1.VerifyInstalled(false);
593
+ packageDv2.VerifyInstalled(true);
594
+
595
+ Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Skipping cross-scope dependency registration on package: PackageA, bundle scope: PerUser, package scope: PerMachine"));
596
+ Assert.True(LogVerifier.MessageInLogFileRegex(bundleHv2InstallLogFilePath, @"Detected related bundle: \{[0-9A-Za-z\-]{36}\}, type: Upgrade, scope: PerUser, version: 1\.0\.0\.0, operation: MajorUpgrade"));
597
+
598
+ bundleHv2.Uninstall();
599
+ bundleHv2.VerifyUnregisteredAndRemovedFromPackageCache();
600
+
601
+ // Verify that permanent packageA is still installed and then remove.
602
+ packageA.VerifyInstalled(true);
603
+ packageDv2.VerifyInstalled(false);
604
+ packageA.UninstallProduct();
605
+ packageA.VerifyInstalled(false);
606
}
607
}
608
}
src/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj
+1
-1
@@ -20,7 +20,7 @@
20
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
21
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
22
<PackageReference Include="WixBuildTools.TestSupport" Version="4.0.48" />
23
- <PackageReference Include="WixToolset.Data" Version="4.0.196" />
23
+ <PackageReference Include="WixToolset.Data" Version="4.0.198" />
24
<PackageReference Include="WixToolset.Mba.Core" Version="4.0.51" />
25
</ItemGroup>
26