From 6cef9ded3d5e246285abc993950ef9964072d9e2 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 25 Nov 2019 14:44:22 +1000 Subject: Always use WiX table definitions when decompiling standard tables. --- .../Unbind/UnbindDatabaseCommand.cs | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/WixToolset.Core.WindowsInstaller') diff --git a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs index 038db0fa..557500e8 100644 --- a/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs +++ b/src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs @@ -294,6 +294,13 @@ namespace WixToolset.Core.WindowsInstaller.Unbind private TableDefinition GetTableDefinition(string tableName, View tableView, View validationView) { + // Use our table definitions whenever possible since they will be used when compiling the source code anyway. + // This also allows us to take advantage of WiX concepts like localizable columns which current code assumes. + if (this.TableDefinitions.Contains(tableName)) + { + return this.TableDefinitions[tableName]; + } + ColumnDefinition[] columns; using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) @@ -431,15 +438,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind } } - var tableDefinition = new TableDefinition(tableName, columns, false); - - // use our table definitions if core properties are the same; this allows us to take advantage - // of wix concepts like localizable columns which current code assumes - if (this.TableDefinitions.Contains(tableName) && 0 == tableDefinition.CompareTo(this.TableDefinitions[tableName])) - { - tableDefinition = this.TableDefinitions[tableName]; - } - return tableDefinition; + return new TableDefinition(tableName, columns, false); } /// -- cgit v1.2.3-55-g6feb