diff options
Diffstat (limited to 'src/WixToolset.Core.WindowsInstaller/Unbind')
| -rw-r--r-- | src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs | 17 |
1 files changed, 8 insertions, 9 deletions
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 | |||
| 294 | 294 | ||
| 295 | private TableDefinition GetTableDefinition(string tableName, View tableView, View validationView) | 295 | private TableDefinition GetTableDefinition(string tableName, View tableView, View validationView) |
| 296 | { | 296 | { |
| 297 | // Use our table definitions whenever possible since they will be used when compiling the source code anyway. | ||
| 298 | // This also allows us to take advantage of WiX concepts like localizable columns which current code assumes. | ||
| 299 | if (this.TableDefinitions.Contains(tableName)) | ||
| 300 | { | ||
| 301 | return this.TableDefinitions[tableName]; | ||
| 302 | } | ||
| 303 | |||
| 297 | ColumnDefinition[] columns; | 304 | ColumnDefinition[] columns; |
| 298 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), | 305 | using (Record columnNameRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFONAMES), |
| 299 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) | 306 | columnTypeRecord = tableView.GetColumnInfo(MsiInterop.MSICOLINFOTYPES)) |
| @@ -431,15 +438,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind | |||
| 431 | } | 438 | } |
| 432 | } | 439 | } |
| 433 | 440 | ||
| 434 | var tableDefinition = new TableDefinition(tableName, columns, false); | 441 | return new TableDefinition(tableName, columns, false); |
| 435 | |||
| 436 | // use our table definitions if core properties are the same; this allows us to take advantage | ||
| 437 | // of wix concepts like localizable columns which current code assumes | ||
| 438 | if (this.TableDefinitions.Contains(tableName) && 0 == tableDefinition.CompareTo(this.TableDefinitions[tableName])) | ||
| 439 | { | ||
| 440 | tableDefinition = this.TableDefinitions[tableName]; | ||
| 441 | } | ||
| 442 | return tableDefinition; | ||
| 443 | } | 442 | } |
| 444 | 443 | ||
| 445 | /// <summary> | 444 | /// <summary> |
