From afbc6889c73d58136cb8851858ca3c17f41dc2c5 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 26 Mar 2020 15:21:06 +1000 Subject: Add BundleExtension element. Add GetTestXml. Fix issue with building with current version of burn. --- src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs | 2 +- .../Bundles/CreateBurnManifestCommand.cs | 12 ++++++++++++ src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) (limited to 'src/WixToolset.Core.Burn') diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs index bf0473d2..53636509 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBundleExeCommand.cs @@ -125,7 +125,7 @@ namespace WixToolset.Core.Burn.Bundles version.FileVersion = fourPartVersion; version.ProductVersion = fourPartVersion; - var strings = version[1033]; + var strings = version[1033] ?? version.Add(1033); strings["LegalCopyright"] = bundleInfo.Copyright; strings["OriginalFilename"] = Path.GetFileName(outputPath); strings["FileVersion"] = bundleInfo.Version; // string versions do not have to be four parts. diff --git a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs index b7ea4116..64a01794 100644 --- a/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs +++ b/src/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs @@ -621,6 +621,18 @@ namespace WixToolset.Core.Burn.Bundles writer.WriteEndElement(); } + // Write the BundleExtension elements. + var bundleExtensions = this.Section.Tuples.OfType(); + + foreach (var bundleExtension in bundleExtensions) + { + writer.WriteStartElement("BundleExtension"); + writer.WriteAttributeString("Id", bundleExtension.Id.Id); + writer.WriteAttributeString("EntryPayloadId", bundleExtension.PayloadRef); + + writer.WriteEndElement(); + } + writer.WriteEndDocument(); // } } diff --git a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj index 3542f85a..ae0e7023 100644 --- a/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj +++ b/src/WixToolset.Core.Burn/WixToolset.Core.Burn.csproj @@ -10,6 +10,12 @@ true + + + <_Parameter1>WixToolset.Core.TestPackage + + + -- cgit v1.2.3-55-g6feb