Build the SoftwareTags.
Sean Hall committed
Mar 4, 2021 at 21:04 UTC
23e3978430ec3ae4f1ea808af0b590b71b2fec9a
17 files changed
+26
-20
src/TestData/PatchTests/BundleA/BundleA.wixproj
+1
@@ -2,6 +2,7 @@
2
<Project Sdk="WixToolset.Sdk">
3
<PropertyGroup>
4
<OutputType>Bundle</OutputType>
5
+ <IncludeSoftwareTag>true</IncludeSoftwareTag>
6
<UpgradeCode>{486FC795-69A5-4130-8727-4068F645A0A1}</UpgradeCode>
7
</PropertyGroup>
8
<ItemGroup>
src/TestData/PatchTests/BundleA/BundleA.wxs
+1
-3
@@ -1,11 +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
3
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
7
</PackageGroup>
8
-
9
- <!--<swid:Tag Regid="regid.1995-08.com.example" />-->
8
</Fragment>
9
</Wix>
src/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj
+1
@@ -2,6 +2,7 @@
2
<Project Sdk="WixToolset.Sdk">
3
<PropertyGroup>
4
<OutputType>Bundle</OutputType>
5
+ <IncludeSoftwareTag>true</IncludeSoftwareTag>
6
<UpgradeCode>{AA083618-6280-44B8-9899-57BCC57906A5}</UpgradeCode>
7
</PropertyGroup>
8
<ItemGroup>
src/TestData/PatchTests/BundlePatchA/BundlePatchA.wxs
+1
-3
@@ -1,11 +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
3
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" PerMachine="yes" />
7
</PackageGroup>
8
-
9
- <!--<swid:Tag Regid="regid.1995-08.com.example" Type="patch" />-->
8
</Fragment>
9
</Wix>
src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj
+1
@@ -2,6 +2,7 @@
2
<Project Sdk="WixToolset.Sdk">
3
<PropertyGroup>
4
<OutputType>Bundle</OutputType>
5
+ <IncludeSoftwareTag>true</IncludeSoftwareTag>
6
<UpgradeCode>{1BE09331-2327-4534-9223-59B54EFAE7A5}</UpgradeCode>
7
</PropertyGroup>
8
<ItemGroup>
src/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wxs
+1
-3
@@ -1,12 +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:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" PerMachine="yes" />
7
<MspPackage Id="PatchA2" SourceFile="$(var.PatchA2.TargetPath)" PerMachine="yes" />
8
</PackageGroup>
9
-
10
- <!--<swid:Tag Regid="regid.1995-08.com.example" Type="patch" />-->
9
</Fragment>
10
</Wix>
src/TestData/PatchTests/PackageAv1/PackageA.props
+1
@@ -4,6 +4,7 @@
4
<PackageName>PackageA</PackageName>
5
<ProductComponentsRef>true</ProductComponentsRef>
6
<ProductCode>{724F9BA5-DD9D-4851-855E-ECC35B27BF11}</ProductCode>
7
+ <IncludeSoftwareTag>true</IncludeSoftwareTag>
8
<UpgradeCode>{C56DA396-7A9A-4177-8264-638161CE9EB8}</UpgradeCode>
9
</PropertyGroup>
10
<ItemGroup>
src/TestData/PatchTests/PackageAv1/ProductComponents.wxs
+1
-3
@@ -1,12 +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:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<ComponentGroup Id="ProductComponents">
6
<ComponentRef Id="RegistryComponent2" />
7
</ComponentGroup>
8
-
9
- <!-- <swid:Tag Regid="regid.1995-08.com.example" /> -->
8
</Fragment>
9
10
<Fragment>
src/TestData/PatchTests/PatchA/PatchA.wxs
+2
-2
@@ -4,7 +4,7 @@
4
<?define Version = 1.0.0.0?>
5
<?endif?>
6
7
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
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
@@ -15,7 +15,7 @@
15
</Media>
16
17
<PatchFamily Id="A" Version="$(var.Version)" Supersede="yes">
18
- <!-- <swid:TagRef Regid="regid.1995-08.com.example" /> -->
18
+ <SoftwareTagRef Regid="regid.1995-08.com.example" />
19
20
<ComponentRef Id="RegistryComponent"/>
21
<PropertyRef Id="TestVersion"/>
src/TestData/PatchTests/PatchA2/PatchA2.wxs
+2
-2
@@ -4,7 +4,7 @@
4
<?define Version = 1.0.0.0?>
5
<?endif?>
6
7
-<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
7
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
8
<Patch AllowRemoval="yes" Classification="Update" Description="Patch A2 in test $(var.TestGroupName)" DisplayName="$(var.TestGroupName) - Patch A2" Manufacturer="Example Corporation" MinorUpdateTargetRTM="yes">
9
<Media Id="100" Cabinet="PatchA2" EmbedCab="yes">
10
<PatchBaseline
@@ -15,7 +15,7 @@
15
</Media>
16
17
<PatchFamily Id="A2" Version="$(var.Version)" Supersede="yes">
18
- <!-- <swid:TagRef Regid="regid.1995-08.com.example" /> -->
18
+ <SoftwareTagRef Regid="regid.1995-08.com.example" />
19
20
<ComponentRef Id="RegistryComponent2"/>
21
</PatchFamily>
src/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wxs
+1
-1
@@ -1,6 +1,6 @@
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:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
src/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wxs
+1
-1
@@ -1,6 +1,6 @@
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:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MsiPackage Id="PackageA" SourceFile="$(var.PackageAv1.TargetPath)" />
src/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wxs
+1
-1
@@ -1,6 +1,6 @@
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:swid="http://wixtoolset.org/schemas/v4/wxs/tag">
3
+<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4
<Fragment>
5
<PackageGroup Id="BundlePackages">
6
<MspPackage Id="PatchA" SourceFile="$(var.PatchA.TargetPath)" />
src/TestData/Templates/Bundle.wxs
+4
@@ -10,6 +10,10 @@
10
11
<Variable Name="TestGroupName" Value="$(var.TestGroupName)" />
12
13
+ <?ifdef SoftwareTag?>
14
+ <SoftwareTag Regid="regid.1995-08.com.example" InstallPath="[CommonAppDataFolder]regid.1995-08.com.example" />
15
+ <?endif?>
16
+
17
<?ifndef BA?>
18
<!-- pulled in through the PackageGroupRef below -->
19
<?elseif $(var.BA) = "TestBAdnc"?>
src/TestData/Templates/Package.wxs
+5
@@ -19,6 +19,10 @@
19
<MediaTemplate CabinetTemplate="{0}$(var.CabPrefix).cab" />
20
<?endif?>
21
22
+ <?ifdef SoftwareTag?>
23
+ <SoftwareTag Regid="regid.1995-08.com.example" InstallDirectory="CommonAppDataFolder" />
24
+ <?endif?>
25
+
26
<PropertyRef Id="TestVersion" />
27
28
<Feature Id="Complete" Level="1">
@@ -32,6 +36,7 @@
36
37
<Fragment>
38
<Directory Id="TARGETDIR" Name="SourceDir">
39
+ <Directory Id="CommonAppDataFolder" />
40
<Directory Id="ProgramFilesFolder">
41
<Directory Id="WixDir" Name="~Test WiX">
42
<Directory Id="TestDir" Name="$(var.TestGroupName)">
src/Wix.Build.targets
+1
@@ -7,6 +7,7 @@
7
<DefineConstants>TestGroupName=$(TestGroupName);PackageName=$(PackageName);BundleName=$(BundleName);$(DefineConstants)</DefineConstants>
8
<DefineConstants Condition=" '$(BA)' != '' ">BA=$(BA);$(DefineConstants)</DefineConstants>
9
<DefineConstants Condition=" '$(CabPrefix)' != '' ">CabPrefix=$(CabPrefix);$(DefineConstants)</DefineConstants>
10
+ <DefineConstants Condition=" '$(IncludeSoftwareTag)' == 'true' ">SoftwareTag=1;$(DefineConstants)</DefineConstants>
11
<DefineConstants Condition=" '$(ProductCode)' != '' ">ProductCode=$(ProductCode);$(DefineConstants)</DefineConstants>
12
<DefineConstants Condition=" '$(ProductComponentsRef)' == 'true' ">ProductComponents=1;$(DefineConstants)</DefineConstants>
13
<DefineConstants Condition=" '$(UpgradeCode)' != '' ">UpgradeCode=$(UpgradeCode);$(DefineConstants)</DefineConstants>
src/WixToolsetTest.BurnE2E/PatchTests.cs
+1
-1
@@ -55,7 +55,7 @@ namespace WixToolsetTest.BurnE2E
55
packageAv1.VerifyTestRegistryRootDeleted();
56
}
57
58
- [Fact(Skip = "https://github.com/wixtoolset/issues/issues/5949")]
58
+ [Fact(Skip = "https://github.com/wixtoolset/issues/issues/6380")]
59
public void CanPatchSwidTag()
60
{
61
var originalVersion = "1.0.0.0";