aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.Converters.Tupleizer
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2019-05-15 16:09:26 -0700
committerRob Mensching <rob@firegiant.com>2019-05-15 16:12:21 -0700
commit6f6c485118796f044a278447722eaf18ac5bf86e (patch)
treede580265227abc257ee85a8973367f5cdce09bd9 /src/test/WixToolsetTest.Converters.Tupleizer
parent8d3f778c61a1a0a576445e8dc7312613363b787d (diff)
downloadwix-6f6c485118796f044a278447722eaf18ac5bf86e.tar.gz
wix-6f6c485118796f044a278447722eaf18ac5bf86e.tar.bz2
wix-6f6c485118796f044a278447722eaf18ac5bf86e.zip
Initial code commit
Diffstat (limited to 'src/test/WixToolsetTest.Converters.Tupleizer')
-rw-r--r--src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs391
-rw-r--r--src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixoutbin0 -> 148559 bytes
-rw-r--r--src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj47
-rw-r--r--src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs36
-rw-r--r--src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj33
5 files changed, 507 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs b/src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs
new file mode 100644
index 00000000..ae33d6b1
--- /dev/null
+++ b/src/test/WixToolsetTest.Converters.Tupleizer/ConvertTuplesFixture.cs
@@ -0,0 +1,391 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolsetTest.Converters.Tupleizer
4{
5 using System;
6 using System.IO;
7 using System.Linq;
8 using WixBuildTools.TestSupport;
9 using Wix3 = Microsoft.Tools.WindowsInstallerXml;
10 using WixToolset.Converters.Tupleizer;
11 using WixToolset.Data;
12 using WixToolset.Data.WindowsInstaller;
13 using WixToolset.Data.Tuples;
14 using Xunit;
15
16 public class ConvertTuplesFixture
17 {
18 [Fact]
19 public void CanLoadWixoutAndConvertToIntermediate()
20 {
21 var rootFolder = TestData.Get();
22 var dataFolder = TestData.Get(@"TestData\Integration");
23
24 using (var fs = new DisposableFileSystem())
25 {
26 var intermediateFolder = fs.GetFolder();
27
28 var path = Path.Combine(dataFolder, "test.wixout");
29 var output = Wix3.Output.Load(path, suppressVersionCheck: true, suppressSchema: true);
30
31 var command = new ConvertTuplesCommand();
32 var intermediate = command.Execute(output);
33
34 Assert.NotNull(intermediate);
35 Assert.Single(intermediate.Sections);
36 Assert.Equal(String.Empty, intermediate.Id);
37
38 // Save and load to guarantee round-tripping support.
39 //
40 var wixiplFile = Path.Combine(intermediateFolder, "test.wixipl");
41 intermediate.Save(wixiplFile);
42
43 intermediate = Intermediate.Load(wixiplFile);
44
45 // Dump to text for easy diffing, with some massaging to keep v3 and v4 diffable.
46 //
47 var tables = output.Tables.Cast<Wix3.Table>();
48 var wix3Dump = tables
49 .SelectMany(table => table.Rows.Cast<Wix3.Row>()
50 .Select(row => RowToString(row)))
51 .ToArray();
52
53 var tuples = intermediate.Sections.SelectMany(s => s.Tuples);
54 var wix4Dump = tuples.Select(tuple => TupleToString(tuple)).ToArray();
55
56 Assert.Equal(wix3Dump, wix4Dump);
57
58 // Useful when you want to diff the outputs with another diff tool...
59 //
60 //var wix3TextDump = String.Join(Environment.NewLine, wix3Dump.OrderBy(val => val));
61 //var wix4TextDump = String.Join(Environment.NewLine, wix4Dump.OrderBy(val => val));
62 //Assert.Equal(wix3TextDump, wix4TextDump);
63 }
64 }
65
66 private static string RowToString(Wix3.Row row)
67 {
68 var fields = String.Join(",", row.Fields.Select(field => field.Data?.ToString()));
69
70 // Massage output to match WiX v3 rows and v4 tuples.
71 //
72 switch (row.Table.Name)
73 {
74 case "File":
75 var fieldValues = row.Fields.Take(7).Select(field => field.Data?.ToString()).ToArray();
76 if (fieldValues[3] == null)
77 {
78 // "Somebody" sometimes writes out a null field even when the column definition says
79 // it's non-nullable. Not naming names or anything. (SWID tags.)
80 fieldValues[3] = "0";
81 }
82 fields = String.Join(",", fieldValues);
83 break;
84 case "WixFile":
85 fields = String.Join(",", row.Fields.Take(8).Select(field => field.Data?.ToString()));
86 break;
87 }
88
89 return $"{row.Table.Name},{fields}";
90 }
91
92 private static string TupleToString(WixToolset.Data.IntermediateTuple tuple)
93 {
94 var fields = String.Join(",", tuple.Fields.Select(field => field?.AsString()));
95
96 switch (tuple.Definition.Name)
97 {
98 // Massage output to match WiX v3 rows and v4 tuples.
99 //
100 case "Component":
101 {
102 var componentTuple = (ComponentTuple)tuple;
103 var attributes = ComponentLocation.Either == componentTuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesOptional : 0;
104 attributes |= ComponentLocation.SourceOnly == componentTuple.Location ? WindowsInstallerConstants.MsidbComponentAttributesSourceOnly : 0;
105 attributes |= ComponentKeyPathType.Registry == componentTuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesRegistryKeyPath : 0;
106 attributes |= ComponentKeyPathType.OdbcDataSource == componentTuple.KeyPathType ? WindowsInstallerConstants.MsidbComponentAttributesODBCDataSource : 0;
107 attributes |= componentTuple.DisableRegistryReflection ? WindowsInstallerConstants.MsidbComponentAttributesDisableRegistryReflection : 0;
108 attributes |= componentTuple.NeverOverwrite ? WindowsInstallerConstants.MsidbComponentAttributesNeverOverwrite : 0;
109 attributes |= componentTuple.Permanent ? WindowsInstallerConstants.MsidbComponentAttributesPermanent : 0;
110 attributes |= componentTuple.SharedDllRefCount ? WindowsInstallerConstants.MsidbComponentAttributesSharedDllRefCount : 0;
111 attributes |= componentTuple.Shared ? WindowsInstallerConstants.MsidbComponentAttributesShared : 0;
112 attributes |= componentTuple.Transitive ? WindowsInstallerConstants.MsidbComponentAttributesTransitive : 0;
113 attributes |= componentTuple.UninstallWhenSuperseded ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0;
114 attributes |= componentTuple.Win64 ? WindowsInstallerConstants.MsidbComponentAttributes64bit : 0;
115
116 fields = String.Join(",",
117 componentTuple.ComponentId,
118 componentTuple.Directory_,
119 attributes.ToString(),
120 componentTuple.Condition,
121 componentTuple.KeyPath
122 );
123 break;
124 }
125 case "CustomAction":
126 {
127 var customActionTuple = (CustomActionTuple)tuple;
128 var type = customActionTuple.Win64 ? WindowsInstallerConstants.MsidbCustomActionType64BitScript : 0;
129 type |= customActionTuple.TSAware ? WindowsInstallerConstants.MsidbCustomActionTypeTSAware : 0;
130 type |= customActionTuple.Impersonate ? 0 : WindowsInstallerConstants.MsidbCustomActionTypeNoImpersonate;
131 type |= customActionTuple.IgnoreResult ? WindowsInstallerConstants.MsidbCustomActionTypeContinue : 0;
132 type |= customActionTuple.Hidden ? WindowsInstallerConstants.MsidbCustomActionTypeHideTarget : 0;
133 type |= customActionTuple.Async ? WindowsInstallerConstants.MsidbCustomActionTypeAsync : 0;
134 type |= CustomActionExecutionType.FirstSequence == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeFirstSequence : 0;
135 type |= CustomActionExecutionType.OncePerProcess == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeOncePerProcess : 0;
136 type |= CustomActionExecutionType.ClientRepeat == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeClientRepeat : 0;
137 type |= CustomActionExecutionType.Deferred == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript : 0;
138 type |= CustomActionExecutionType.Rollback == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeRollback : 0;
139 type |= CustomActionExecutionType.Commit == customActionTuple.ExecutionType ? WindowsInstallerConstants.MsidbCustomActionTypeInScript | WindowsInstallerConstants.MsidbCustomActionTypeCommit : 0;
140 type |= CustomActionSourceType.File == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeSourceFile : 0;
141 type |= CustomActionSourceType.Directory == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeDirectory : 0;
142 type |= CustomActionSourceType.Property == customActionTuple.SourceType ? WindowsInstallerConstants.MsidbCustomActionTypeProperty : 0;
143 type |= CustomActionTargetType.Dll == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeDll : 0;
144 type |= CustomActionTargetType.Exe == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeExe : 0;
145 type |= CustomActionTargetType.TextData == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeTextData : 0;
146 type |= CustomActionTargetType.JScript == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeJScript : 0;
147 type |= CustomActionTargetType.VBScript == customActionTuple.TargetType ? WindowsInstallerConstants.MsidbCustomActionTypeVBScript : 0;
148
149 fields = String.Join(",",
150 type.ToString(),
151 customActionTuple.Source,
152 customActionTuple.Target,
153 customActionTuple.PatchUninstall ? WindowsInstallerConstants.MsidbCustomActionTypePatchUninstall.ToString() : null
154 );
155 break;
156 }
157 case "Feature":
158 {
159 var featureTuple = (FeatureTuple)tuple;
160 var attributes = featureTuple.DisallowAbsent ? WindowsInstallerConstants.MsidbFeatureAttributesUIDisallowAbsent : 0;
161 attributes |= featureTuple.DisallowAdvertise ? WindowsInstallerConstants.MsidbFeatureAttributesDisallowAdvertise : 0;
162 attributes |= FeatureInstallDefault.FollowParent == featureTuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFollowParent : 0;
163 attributes |= FeatureInstallDefault.Source == featureTuple.InstallDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorSource : 0;
164 attributes |= FeatureTypicalDefault.Advertise == featureTuple.TypicalDefault ? WindowsInstallerConstants.MsidbFeatureAttributesFavorAdvertise : 0;
165
166 fields = String.Join(",",
167 featureTuple.Feature_Parent,
168 featureTuple.Title,
169 featureTuple.Description,
170 featureTuple.Display.ToString(),
171 featureTuple.Level.ToString(),
172 featureTuple.Directory_,
173 attributes.ToString());
174 break;
175 }
176 case "File":
177 {
178 var fileTuple = (FileTuple)tuple;
179 fields = String.Join(",",
180 fileTuple.Component_,
181 fileTuple.LongFileName,
182 fileTuple.FileSize.ToString(),
183 fileTuple.Version,
184 fileTuple.Language,
185 ((fileTuple.ReadOnly ? WindowsInstallerConstants.MsidbFileAttributesReadOnly : 0)
186 | (fileTuple.Hidden ? WindowsInstallerConstants.MsidbFileAttributesHidden : 0)
187 | (fileTuple.System ? WindowsInstallerConstants.MsidbFileAttributesSystem : 0)
188 | (fileTuple.Vital ? WindowsInstallerConstants.MsidbFileAttributesVital : 0)
189 | (fileTuple.Checksum ? WindowsInstallerConstants.MsidbFileAttributesChecksum : 0)
190 | ((fileTuple.Compressed.HasValue && fileTuple.Compressed.Value) ? WindowsInstallerConstants.MsidbFileAttributesCompressed : 0)
191 | ((fileTuple.Compressed.HasValue && !fileTuple.Compressed.Value) ? WindowsInstallerConstants.MsidbFileAttributesNoncompressed : 0))
192 .ToString());
193 break;
194 }
195
196 case "Registry":
197 {
198 var registryTuple = (RegistryTuple)tuple;
199 var value = registryTuple.Value;
200
201 switch (registryTuple.ValueType)
202 {
203 case RegistryValueType.Binary:
204 value = String.Concat("#x", value);
205 break;
206 case RegistryValueType.Expandable:
207 value = String.Concat("#%", value);
208 break;
209 case RegistryValueType.Integer:
210 value = String.Concat("#", value);
211 break;
212 case RegistryValueType.MultiString:
213 switch (registryTuple.ValueAction)
214 {
215 case RegistryValueActionType.Append:
216 value = String.Concat("[~]", value);
217 break;
218 case RegistryValueActionType.Prepend:
219 value = String.Concat(value, "[~]");
220 break;
221 case RegistryValueActionType.Write:
222 default:
223 if (null != value && -1 == value.IndexOf("[~]", StringComparison.Ordinal))
224 {
225 value = String.Concat("[~]", value, "[~]");
226 }
227 break;
228 }
229 break;
230 case RegistryValueType.String:
231 // escape the leading '#' character for string registry keys
232 if (null != value && value.StartsWith("#", StringComparison.Ordinal))
233 {
234 value = String.Concat("#", value);
235 }
236 break;
237 }
238
239 fields = String.Join(",",
240 ((int)registryTuple.Root).ToString(),
241 registryTuple.Key,
242 registryTuple.Name,
243 value,
244 registryTuple.Component_
245 );
246 break;
247 }
248
249 case "RemoveRegistry":
250 {
251 var removeRegistryTuple = (RemoveRegistryTuple)tuple;
252 fields = String.Join(",",
253 ((int)removeRegistryTuple.Root).ToString(),
254 removeRegistryTuple.Key,
255 removeRegistryTuple.Name,
256 removeRegistryTuple.Component_
257 );
258 break;
259 }
260
261 case "ServiceControl":
262 {
263 var serviceControlTuple = (ServiceControlTuple)tuple;
264
265 var events = serviceControlTuple.InstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventDelete : 0;
266 events |= serviceControlTuple.UninstallRemove ? WindowsInstallerConstants.MsidbServiceControlEventUninstallDelete : 0;
267 events |= serviceControlTuple.InstallStart ? WindowsInstallerConstants.MsidbServiceControlEventStart : 0;
268 events |= serviceControlTuple.UninstallStart ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStart : 0;
269 events |= serviceControlTuple.InstallStop ? WindowsInstallerConstants.MsidbServiceControlEventStop : 0;
270 events |= serviceControlTuple.UninstallStop ? WindowsInstallerConstants.MsidbServiceControlEventUninstallStop : 0;
271
272 fields = String.Join(",",
273 serviceControlTuple.Name,
274 events.ToString(),
275 serviceControlTuple.Arguments,
276 serviceControlTuple.Wait == true ? "1" : "0",
277 serviceControlTuple.Component_
278 );
279 break;
280 }
281
282 case "ServiceInstall":
283 {
284 var serviceInstallTuple = (ServiceInstallTuple)tuple;
285
286 var errorControl = (int)serviceInstallTuple.ErrorControl;
287 errorControl |= serviceInstallTuple.Vital ? WindowsInstallerConstants.MsidbServiceInstallErrorControlVital : 0;
288
289 var serviceType = (int)serviceInstallTuple.ServiceType;
290 serviceType |= serviceInstallTuple.Interactive ? WindowsInstallerConstants.MsidbServiceInstallInteractive : 0;
291
292 fields = String.Join(",",
293 serviceInstallTuple.Name,
294 serviceInstallTuple.DisplayName,
295 serviceType.ToString(),
296 ((int)serviceInstallTuple.StartType).ToString(),
297 errorControl.ToString(),
298 serviceInstallTuple.LoadOrderGroup,
299 serviceInstallTuple.Dependencies,
300 serviceInstallTuple.StartName,
301 serviceInstallTuple.Password,
302 serviceInstallTuple.Arguments,
303 serviceInstallTuple.Component_,
304 serviceInstallTuple.Description
305 );
306 break;
307 }
308
309 case "Upgrade":
310 {
311 var upgradeTuple = (UpgradeTuple)tuple;
312
313 var attributes = upgradeTuple.MigrateFeatures ? WindowsInstallerConstants.MsidbUpgradeAttributesMigrateFeatures : 0;
314 attributes |= upgradeTuple.OnlyDetect ? WindowsInstallerConstants.MsidbUpgradeAttributesOnlyDetect : 0;
315 attributes |= upgradeTuple.IgnoreRemoveFailures ? WindowsInstallerConstants.MsidbUpgradeAttributesIgnoreRemoveFailure : 0;
316 attributes |= upgradeTuple.VersionMinInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMinInclusive : 0;
317 attributes |= upgradeTuple.VersionMaxInclusive ? WindowsInstallerConstants.MsidbUpgradeAttributesVersionMaxInclusive : 0;
318 attributes |= upgradeTuple.ExcludeLanguages ? WindowsInstallerConstants.MsidbUpgradeAttributesLanguagesExclusive : 0;
319
320 fields = String.Join(",",
321 upgradeTuple.VersionMin,
322 upgradeTuple.VersionMax,
323 upgradeTuple.Language,
324 attributes.ToString(),
325 upgradeTuple.Remove,
326 upgradeTuple.ActionProperty
327 );
328 break;
329 }
330
331 case "WixAction":
332 {
333 var wixActionTuple = (WixActionTuple)tuple;
334 fields = String.Join(",",
335 wixActionTuple.SequenceTable,
336 wixActionTuple.Action,
337 wixActionTuple.Condition,
338 // BUGBUGBUG: AB#2626
339 wixActionTuple.Sequence == 0 ? String.Empty : wixActionTuple.Sequence.ToString(),
340 wixActionTuple.Before,
341 wixActionTuple.After,
342 wixActionTuple.Overridable == true ? "1" : "0"
343 );
344 break;
345 }
346
347 case "WixComplexReference":
348 {
349 var wixComplexReferenceTuple = (WixComplexReferenceTuple)tuple;
350 fields = String.Join(",",
351 wixComplexReferenceTuple.Parent,
352 ((int)wixComplexReferenceTuple.ParentType).ToString(),
353 wixComplexReferenceTuple.ParentLanguage,
354 wixComplexReferenceTuple.Child,
355 ((int)wixComplexReferenceTuple.ChildType).ToString(),
356 wixComplexReferenceTuple.IsPrimary ? "1" : "0"
357 );
358 break;
359 }
360
361 case "WixFile":
362 {
363 var wixFileTuple = (WixFileTuple)tuple;
364 fields = String.Concat(
365 wixFileTuple.AssemblyType == FileAssemblyType.DotNetAssembly ? "0" : wixFileTuple.AssemblyType == FileAssemblyType.Win32Assembly ? "1" : String.Empty, ",",
366 String.Join(",", tuple.Fields.Skip(2).Take(6).Select(field => (string)field).ToArray()));
367 break;
368 }
369
370 case "WixProperty":
371 {
372 var wixPropertyTuple = (WixPropertyTuple)tuple;
373 var attributes = 0;
374 attributes |= wixPropertyTuple.Admin ? 0x1 : 0;
375 attributes |= wixPropertyTuple.Hidden ? 0x2 : 0;
376 attributes |= wixPropertyTuple.Secure ? 0x4 : 0;
377
378 fields = String.Join(",",
379 wixPropertyTuple.Property_,
380 attributes.ToString()
381 );
382 break;
383 }
384
385 }
386
387 var id = tuple.Id == null ? String.Empty : String.Concat(",", tuple.Id.Id);
388 return $"{tuple.Definition.Name}{id},{fields}";
389 }
390 }
391}
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout
new file mode 100644
index 00000000..da64b8af
--- /dev/null
+++ b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixout
Binary files differ
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj
new file mode 100644
index 00000000..8af13dc8
--- /dev/null
+++ b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wixproj
@@ -0,0 +1,47 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <PropertyGroup>
4 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
6 <ProductVersion>3.10</ProductVersion>
7 <ProjectGuid>d59f1c1e-9238-49fa-bfa2-ec1d9c2dda1d</ProjectGuid>
8 <SchemaVersion>2.0</SchemaVersion>
9 <OutputName>TupleizerWixout</OutputName>
10 <OutputType>Package</OutputType>
11 </PropertyGroup>
12 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
13 <OutputPath>bin\$(Configuration)\</OutputPath>
14 <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
15 <DefineConstants>Debug</DefineConstants>
16 </PropertyGroup>
17 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
18 <OutputPath>bin\$(Configuration)\</OutputPath>
19 <IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
20 </PropertyGroup>
21 <ItemGroup>
22 <Compile Include="Product.wxs" />
23 </ItemGroup>
24 <ItemGroup>
25 <WixExtension Include="WixUtilExtension">
26 <HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
27 <Name>WixUtilExtension</Name>
28 </WixExtension>
29 <WixExtension Include="WixNetFxExtension">
30 <HintPath>$(WixExtDir)\WixNetFxExtension.dll</HintPath>
31 <Name>WixNetFxExtension</Name>
32 </WixExtension>
33 </ItemGroup>
34 <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
35 <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
36 <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
37 <Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
38 </Target>
39 <!--
40 To modify your build process, add your task inside one of the targets below and uncomment it.
41 Other similar extension points exist, see Wix.targets.
42 <Target Name="BeforeBuild">
43 </Target>
44 <Target Name="AfterBuild">
45 </Target>
46 -->
47</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs
new file mode 100644
index 00000000..1006a254
--- /dev/null
+++ b/src/test/WixToolsetTest.Converters.Tupleizer/TestData/Integration/test.wxs
@@ -0,0 +1,36 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3 <Product Id="*" Name="TupleizerWixout" Language="1033" Version="1.0.0.0" Manufacturer="FireGiant" UpgradeCode="14a02d7f-9b32-4c92-b1f1-da518bf4e32a">
4 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
5
6 <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" IgnoreRemoveFailure="yes" />
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="TupleizerWixout" Level="1">
10 <Feature Id="ChildFeature">
11 <ComponentGroupRef Id="ProductComponents" />
12 </Feature>
13 </Feature>
14
15 <PropertyRef Id="WIX_IS_NETFRAMEWORK_462_OR_LATER_INSTALLED" />
16 <CustomActionRef Id="WixFailWhenDeferred" />
17 <Property Id="WIXFAILWHENDEFERRED" Value="1" Secure="yes" />
18 </Product>
19
20 <Fragment>
21 <Directory Id="TARGETDIR" Name="SourceDir">
22 <Directory Id="ProgramFilesFolder">
23 <Directory Id="INSTALLFOLDER" Name="TupleizerWixout" />
24 </Directory>
25 </Directory>
26 </Fragment>
27
28 <Fragment>
29 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
30 <Component Id="ProductComponent">
31 <File Checksum="yes" ReadOnly="yes" Source="$(env.WIX)\bin\candle.exe" Assembly=".net" AssemblyApplication="candle.exe" />
32 <RegistryValue Root="HKLM" Key="SOFTWARE\WiX Toolset" Name="[ProductName]Installed" Value="1" Type="integer" />
33 </Component>
34 </ComponentGroup>
35 </Fragment>
36</Wix>
diff --git a/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj b/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj
new file mode 100644
index 00000000..fa6a6bcf
--- /dev/null
+++ b/src/test/WixToolsetTest.Converters.Tupleizer/WixToolsetTest.Converters.Tupleizer.csproj
@@ -0,0 +1,33 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4<Project Sdk="Microsoft.NET.Sdk">
5
6 <PropertyGroup>
7 <TargetFramework>net461</TargetFramework>
8 <IsPackable>false</IsPackable>
9 </PropertyGroup>
10
11 <ItemGroup>
12 <Content Include="TestData\Integration\test.wixout" CopyToOutputDirectory="PreserveNewest" />
13 </ItemGroup>
14
15 <ItemGroup>
16 <ProjectReference Include="..\..\WixToolset.Converters.Tupleizer\WixToolset.Converters.Tupleizer.csproj" />
17 </ItemGroup>
18
19 <ItemGroup>
20 <PackageReference Include="WixToolset.Data" Version="4.0.*" />
21 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
22 </ItemGroup>
23
24 <ItemGroup>
25 <Reference Include="wix" HintPath="..\..\deps\wix.dll" />
26 </ItemGroup>
27
28 <ItemGroup>
29 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
30 <PackageReference Include="xunit" Version="2.4.1" />
31 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
32 </ItemGroup>
33</Project>