@joebigelow / wix-1 / commits / 0a596a3c

Fix changes to TableDefinition.

Sean Hall committed Apr 13, 2020 at 13:36 UTC 0a596a3cd67e5e7749cb529b3eb1ee2ea38901b3
5 files changed +10 -5
src/WixToolset.Core.WindowsInstaller/Bind/LoadTableDefinitionsCommand.cs
+1 -1
@@ -230,7 +230,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
230 columns.Add(columnDefinition);
231 }
232
233 - var customTable = new TableDefinition(tuple.Id.Id, columns, tuple.Unreal);
233 + var customTable = new TableDefinition(tuple.Id.Id, null, columns, tuple.Unreal);
234 return customTable;
235 }
236 }
src/WixToolset.Core.WindowsInstaller/Unbind/UnbindDatabaseCommand.cs
+1 -1
@@ -421,7 +421,7 @@ namespace WixToolset.Core.WindowsInstaller.Unbind
421 }
422 }
423
424 - return new TableDefinition(tableName, columns, false);
424 + return new TableDefinition(tableName, null, columns, false);
425 }
426
427 /// <summary>
src/WixToolset.Core/ExtensibilityServices/WindowsInstallerBackendHelper.cs
+1 -1
@@ -21,7 +21,7 @@ namespace WixToolset.Core.ExtensibilityServices
21
22 public bool TryAddTupleToOutputMatchingTableDefinitions(IntermediateSection section, IntermediateTuple tuple, WindowsInstallerData output, TableDefinitionCollection tableDefinitions)
23 {
24 - var tableDefinition = tableDefinitions.FirstOrDefault(t => t.TupleDefinitionName == tuple.Definition.Name);
24 + var tableDefinition = tableDefinitions.FirstOrDefault(t => t.TupleDefinition?.Name == tuple.Definition.Name);
25 if (tableDefinition == null)
26 {
27 return false;
src/test/Example.Extension/Example.Extension.csproj
+5 -1
@@ -6,9 +6,14 @@
6 <TargetFramework>netstandard2.0</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 + <CompileWixlibExePath>$(OutputPath)net472\CompileCoreTestExtensionWixlib.exe</CompileWixlibExePath>
10 </PropertyGroup>
11
12 <ItemGroup>
13 + <!-- Try to hack around VS up-to-date detection -->
14 + <Content Include="$(CompileWixlibExePath)" CopyToOutputDirectory="PreserveNewest">
15 + <Visible>false</Visible>
16 + </Content>
17 <ExtensionWxs Include="Data\example.wxs" />
18 </ItemGroup>
19
@@ -24,7 +29,6 @@
29
30 <Target Name="SetExtensionWixlib">
31 <PropertyGroup>
27 - <CompileWixlibExePath>$(OutputPath)..\net472\CompileCoreTestExtensionWixlib.exe</CompileWixlibExePath>
32 <WixlibPath>$(IntermediateOutputPath)Example.wixlib</WixlibPath>
33 </PropertyGroup>
34
src/test/Example.Extension/ExampleTableDefinitions.cs
+2 -1
@@ -8,17 +8,18 @@ namespace Example.Extension
8 {
9 public static readonly TableDefinition ExampleTable = new TableDefinition(
10 "Wix4Example",
11 + ExampleTupleDefinitions.Example,
12 new[]
13 {
14 new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier),
15 new ColumnDefinition("Value", ColumnType.String, 0, false, false, ColumnCategory.Formatted),
16 },
16 - tupleDefinitionName: ExampleTupleDefinitions.Example.Name,
17 tupleIdIsPrimaryKey: true
18 );
19
20 public static readonly TableDefinition NotInAll = new TableDefinition(
21 "TableDefinitionNotExposedByExtension",
22 + null,
23 new[]
24 {
25 new ColumnDefinition("Example", ColumnType.String, 72, true, false, ColumnCategory.Identifier),