From 3fb889ab7aa3cb0dfae23e0379e28552e919ad72 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sat, 6 Jun 2020 15:49:09 -0700 Subject: Integrate change to TryParseCommand and other code cleanup --- .../Bind/BindDatabaseCommand.cs | 27 +++++++++++----------- .../Bind/UpdateTransformsWithFileFacades.cs | 2 -- 2 files changed, 13 insertions(+), 16 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs index ffaf1479..bdb089ee 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/BindDatabaseCommand.cs @@ -403,13 +403,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind this.ValidateComponentGuids(output); - // We can create instance transforms since Component Guids and Outputs are created. - if (output.Type == OutputType.Product) - { - var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); - command.Execute(); - } - // Stop processing if an error previously occurred. if (this.Messaging.EncounteredError) { @@ -452,19 +445,25 @@ namespace WixToolset.Core.WindowsInstaller.Bind trackedFiles.AddRange(command.TrackedFiles); } - if (output.Type == OutputType.Patch) - { - // Copy output data back into the transforms. - var command = new UpdateTransformsWithFileFacades(this.Messaging, output, this.SubStorages, tableDefinitions, fileFacades); - command.Execute(); - } - // stop processing if an error previously occurred if (this.Messaging.EncounteredError) { return null; } + // We can create instance transforms since Component Guids and Outputs are created. + if (output.Type == OutputType.Product) + { + var command = new CreateInstanceTransformsCommand(section, output, tableDefinitions, this.BackendHelper); + command.Execute(); + } + else if (output.Type == OutputType.Patch) + { + // Copy output data back into the transforms. + var command = new UpdateTransformsWithFileFacades(this.Messaging, output, this.SubStorages, tableDefinitions, fileFacades); + command.Execute(); + } + // Generate database file. this.Messaging.Write(VerboseMessages.GeneratingDatabase()); diff --git a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs index af2e8f85..2af45e77 100644 --- a/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs +++ b/src/WixToolset.Core.WindowsInstaller/Bind/UpdateTransformsWithFileFacades.cs @@ -4,8 +4,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind { using System; using System.Collections.Generic; - using System.Diagnostics; - using System.IO; using System.Linq; using WixToolset.Core.Bind; using WixToolset.Data; -- cgit v1.2.3-55-g6feb