aboutsummaryrefslogtreecommitdiff
path: root/src/test/WixToolsetTest.Sdk
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/WixToolsetTest.Sdk')
-rw-r--r--src/test/WixToolsetTest.Sdk/MsbuildFixture.cs408
-rw-r--r--src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs150
-rw-r--r--src/test/WixToolsetTest.Sdk/MsbuildUtilities.cs98
-rw-r--r--src/test/WixToolsetTest.Sdk/README.md5
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj58
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json1
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt1
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs22
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj53
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs21
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj44
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs22
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs22
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj42
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt1
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj50
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl11
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl11
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs21
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs10
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt1
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln31
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj46
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl11
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs25
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs10
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt1
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs10
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj42
-rw-r--r--src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln39
-rw-r--r--src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj48
-rw-r--r--src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject8
32 files changed, 1323 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs b/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs
new file mode 100644
index 00000000..1ce326d8
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/MsbuildFixture.cs
@@ -0,0 +1,408 @@
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.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10 using Xunit;
11
12 public class MsbuildFixture
13 {
14 [Theory]
15 [InlineData(BuildSystem.DotNetCoreSdk)]
16 [InlineData(BuildSystem.MSBuild)]
17 [InlineData(BuildSystem.MSBuild64)]
18 public void CanBuildSimpleBundle(BuildSystem buildSystem)
19 {
20 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage");
21
22 using (var fs = new TestDataFolderFileSystem())
23 {
24 fs.Initialize(sourceFolder);
25 var baseFolder = Path.Combine(fs.BaseFolder, "SimpleBundle");
26 var binFolder = Path.Combine(baseFolder, @"bin\");
27 var projectPath = Path.Combine(baseFolder, "SimpleBundle.wixproj");
28
29 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
30 result.AssertSuccess();
31
32 var warnings = result.Output.Where(line => line.Contains(": warning"));
33 Assert.Empty(warnings);
34
35 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
36 .Select(s => s.Substring(baseFolder.Length + 1))
37 .OrderBy(s => s)
38 .ToArray();
39 Assert.Equal(new[]
40 {
41 @"bin\x86\Release\SimpleBundle.exe",
42 @"bin\x86\Release\SimpleBundle.wixpdb",
43 }, paths);
44 }
45 }
46
47 [Theory]
48 [InlineData(BuildSystem.DotNetCoreSdk)]
49 [InlineData(BuildSystem.MSBuild)]
50 [InlineData(BuildSystem.MSBuild64)]
51 public void CanBuildSimpleMergeModule(BuildSystem buildSystem)
52 {
53 var sourceFolder = TestData.Get(@"TestData\MergeModule\SimpleMergeModule");
54
55 using (var fs = new TestDataFolderFileSystem())
56 {
57 fs.Initialize(sourceFolder);
58 var baseFolder = fs.BaseFolder;
59 var binFolder = Path.Combine(baseFolder, @"bin\");
60 var projectPath = Path.Combine(baseFolder, "SimpleMergeModule.wixproj");
61
62 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
63 result.AssertSuccess();
64
65 var warnings = result.Output.Where(line => line.Contains(": warning"));
66 Assert.Empty(warnings);
67
68 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
69 .Select(s => s.Substring(baseFolder.Length + 1))
70 .OrderBy(s => s)
71 .ToArray();
72 Assert.Equal(new[]
73 {
74 @"bin\x86\Release\SimpleMergeModule.msm",
75 @"bin\x86\Release\SimpleMergeModule.wixpdb",
76 }, paths);
77 }
78 }
79
80 [Theory]
81 [InlineData(BuildSystem.DotNetCoreSdk)]
82 [InlineData(BuildSystem.MSBuild)]
83 [InlineData(BuildSystem.MSBuild64)]
84 public void CanBuildSimpleMsiPackage(BuildSystem buildSystem)
85 {
86 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
87
88 using (var fs = new TestDataFolderFileSystem())
89 {
90 fs.Initialize(sourceFolder);
91 var baseFolder = fs.BaseFolder;
92 var binFolder = Path.Combine(baseFolder, @"bin\");
93 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
94
95 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
96 result.AssertSuccess();
97
98 var platformSwitches = result.Output.Where(line => line.Contains("-platform x86"));
99 Assert.Single(platformSwitches);
100
101 var warnings = result.Output.Where(line => line.Contains(": warning"));
102 Assert.Equal(4, warnings.Count());
103
104 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
105 .Select(s => s.Substring(baseFolder.Length + 1))
106 .OrderBy(s => s)
107 .ToArray();
108 Assert.Equal(new[]
109 {
110 @"bin\x86\Release\en-US\cab1.cab",
111 @"bin\x86\Release\en-US\MsiPackage.msi",
112 @"bin\x86\Release\en-US\MsiPackage.wixpdb",
113 }, paths);
114 }
115 }
116
117 [Theory]
118 [InlineData(BuildSystem.DotNetCoreSdk)]
119 [InlineData(BuildSystem.MSBuild)]
120 [InlineData(BuildSystem.MSBuild64)]
121 public void CanBuildSimpleMsiPackageWithMergeModule(BuildSystem buildSystem)
122 {
123 var sourceFolder = TestData.Get(@"TestData\MergeModule");
124
125 using (var fs = new TestDataFolderFileSystem())
126 {
127 fs.Initialize(sourceFolder);
128 var baseFolder = Path.Combine(fs.BaseFolder, "MergeMsiPackage");
129 var binFolder = Path.Combine(baseFolder, @"bin\");
130 var projectPath = Path.Combine(baseFolder, "MergeMsiPackage.wixproj");
131
132 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
133 result.AssertSuccess();
134
135 var warnings = result.Output.Where(line => line.Contains(": warning"));
136 Assert.Empty(warnings);
137
138 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
139 .Select(s => s.Substring(baseFolder.Length + 1))
140 .OrderBy(s => s)
141 .ToArray();
142 Assert.Equal(new[]
143 {
144 @"bin\x86\Release\cab1.cab",
145 @"bin\x86\Release\MergeMsiPackage.msi",
146 @"bin\x86\Release\MergeMsiPackage.wixpdb",
147 }, paths);
148 }
149 }
150
151 [Theory]
152 [InlineData(BuildSystem.DotNetCoreSdk)]
153 [InlineData(BuildSystem.MSBuild)]
154 [InlineData(BuildSystem.MSBuild64)]
155 public void CanBuildWithDefaultAndExplicitlyFullWixpdbs(BuildSystem buildSystem)
156 {
157 var expectedOutputs = new[]
158 {
159 @"bin\x86\Release\en-US\cab1.cab",
160 @"bin\x86\Release\en-US\MsiPackage.msi",
161 @"bin\x86\Release\en-US\MsiPackage.wixpdb",
162 };
163
164 this.AssertWixpdb(buildSystem, null, expectedOutputs);
165 this.AssertWixpdb(buildSystem, "Full", expectedOutputs);
166 }
167
168 [Theory]
169 [InlineData(BuildSystem.DotNetCoreSdk)]
170 [InlineData(BuildSystem.MSBuild)]
171 [InlineData(BuildSystem.MSBuild64)]
172 public void CanBuildWithNoWixpdb(BuildSystem buildSystem)
173 {
174 this.AssertWixpdb(buildSystem, "NONE", new[]
175 {
176 @"bin\x86\Release\en-US\cab1.cab",
177 @"bin\x86\Release\en-US\MsiPackage.msi",
178 });
179 }
180
181 private void AssertWixpdb(BuildSystem buildSystem, string wixpdbType, string[] expectedOutputFiles)
182 {
183 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
184
185 using (var fs = new TestDataFolderFileSystem())
186 {
187 fs.Initialize(sourceFolder);
188 var baseFolder = fs.BaseFolder;
189 var binFolder = Path.Combine(baseFolder, @"bin\");
190 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
191
192 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
193 {
194 wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}",
195 });
196 result.AssertSuccess();
197
198 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
199 .Select(s => s.Substring(baseFolder.Length + 1))
200 .OrderBy(s => s)
201 .ToArray();
202 Assert.Equal(expectedOutputFiles, paths);
203 }
204 }
205
206 [Theory]
207 [InlineData(BuildSystem.DotNetCoreSdk)]
208 [InlineData(BuildSystem.MSBuild)]
209 [InlineData(BuildSystem.MSBuild64)]
210 public void CanBuild64BitMsiPackage(BuildSystem buildSystem)
211 {
212 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
213
214 using (var fs = new TestDataFolderFileSystem())
215 {
216 fs.Initialize(sourceFolder);
217 var baseFolder = fs.BaseFolder;
218 var binFolder = Path.Combine(baseFolder, @"bin\");
219 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
220
221 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
222 {
223 $"-p:Platform=x64",
224 });
225 result.AssertSuccess();
226
227 var platformSwitches = result.Output.Where(line => line.Contains("-platform x64"));
228 Assert.Single(platformSwitches);
229
230 var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
231 .Select(s => s.Substring(baseFolder.Length + 1))
232 .OrderBy(s => s)
233 .ToArray();
234 Assert.Equal(new[]
235 {
236 @"bin\x64\Release\en-US\cab1.cab",
237 @"bin\x64\Release\en-US\MsiPackage.msi",
238 @"bin\x64\Release\en-US\MsiPackage.wixpdb",
239 }, paths);
240 }
241 }
242
243 [Theory(Skip = "Currently fails")]
244 [InlineData(BuildSystem.DotNetCoreSdk)]
245 [InlineData(BuildSystem.MSBuild)]
246 [InlineData(BuildSystem.MSBuild64)]
247 public void CanBuildSimpleMsiPackageWithIceSuppressions(BuildSystem buildSystem)
248 {
249 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
250
251 using (var fs = new TestDataFolderFileSystem())
252 {
253 fs.Initialize(sourceFolder);
254 var baseFolder = fs.BaseFolder;
255 var binFolder = Path.Combine(baseFolder, @"bin\");
256 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
257
258 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
259 {
260 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressIces", "ICE45;ICE46"),
261 });
262 result.AssertSuccess();
263 }
264 }
265
266 [Theory]
267 [InlineData(BuildSystem.DotNetCoreSdk)]
268 [InlineData(BuildSystem.MSBuild)]
269 [InlineData(BuildSystem.MSBuild64)]
270 public void CanBuildSimpleMsiPackageWithWarningSuppressions(BuildSystem buildSystem)
271 {
272 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
273
274 using (var fs = new TestDataFolderFileSystem())
275 {
276 fs.Initialize(sourceFolder);
277 var baseFolder = fs.BaseFolder;
278 var binFolder = Path.Combine(baseFolder, @"bin\");
279 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
280
281 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
282 {
283 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressSpecificWarnings", "1118;1102"),
284 });
285 result.AssertSuccess();
286
287 var warnings = result.Output.Where(line => line.Contains(": warning"));
288 Assert.Empty(warnings);
289 }
290 }
291
292 [Theory]
293 [InlineData(BuildSystem.DotNetCoreSdk, null)]
294 [InlineData(BuildSystem.DotNetCoreSdk, true)]
295 [InlineData(BuildSystem.MSBuild, null)]
296 [InlineData(BuildSystem.MSBuild, true)]
297 [InlineData(BuildSystem.MSBuild64, null)]
298 [InlineData(BuildSystem.MSBuild64, true)]
299 public void CanBuildSimpleMsiPackageAsWixipl(BuildSystem buildSystem, bool? outOfProc)
300 {
301 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
302
303 using (var fs = new TestDataFolderFileSystem())
304 {
305 fs.Initialize(sourceFolder);
306 var baseFolder = fs.BaseFolder;
307 var binFolder = Path.Combine(baseFolder, @"bin\");
308 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
309
310 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
311 {
312 "-p:OutputType=IntermediatePostLink",
313 }, outOfProc: outOfProc);
314 result.AssertSuccess();
315
316 var wixBuildCommands = MsbuildUtilities.GetToolCommandLines(result, "wix", "build", buildSystem, outOfProc);
317 Assert.Single(wixBuildCommands);
318
319 var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories)
320 .Select(s => s.Substring(baseFolder.Length + 1))
321 .Single();
322 Assert.Equal(@"bin\x86\Release\MsiPackage.wixipl", path);
323 }
324 }
325
326 [Theory]
327 [InlineData(BuildSystem.DotNetCoreSdk)]
328 [InlineData(BuildSystem.MSBuild)]
329 [InlineData(BuildSystem.MSBuild64)]
330 public void CanBuildAndCleanSimpleMsiPackage(BuildSystem buildSystem)
331 {
332 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
333
334 using (var fs = new TestDataFolderFileSystem())
335 {
336 fs.Initialize(sourceFolder);
337 var baseFolder = fs.BaseFolder;
338 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
339
340 // Build
341 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, verbosityLevel: "diag");
342 result.AssertSuccess();
343
344 var buildOutput = String.Join("\r\n", result.Output);
345
346 var createdPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories)
347 .Select(s => s.Substring(baseFolder.Length + 1))
348 .OrderBy(s => s)
349 .ToArray();
350 Assert.NotEmpty(createdPaths);
351
352 // Clean
353 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
354 {
355 "-t:Clean",
356 }, verbosityLevel: "diag");
357 result.AssertSuccess();
358
359 var cleanOutput = String.Join("\r\n", result.Output);
360
361 // Clean is only expected to delete the files listed in {Project}.FileListAbsolute.txt,
362 // so this is not quite right but close enough.
363 var allowedFiles = new HashSet<string>
364 {
365 "MsiPackage.wixproj",
366 "Package.en-us.wxl",
367 "Package.wxs",
368 "PackageComponents.wxs",
369 @"data\test.txt",
370 @"obj\x86\Release\MsiPackage.wixproj.FileListAbsolute.txt",
371 };
372
373 var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories)
374 .Select(s => s.Substring(baseFolder.Length + 1))
375 .Where(s => !allowedFiles.Contains(s))
376 .OrderBy(s => s)
377 .ToArray();
378 Assert.Empty(remainingPaths);
379 }
380 }
381
382 [Theory]
383 [InlineData(BuildSystem.DotNetCoreSdk)]
384 [InlineData(BuildSystem.MSBuild)]
385 [InlineData(BuildSystem.MSBuild64)]
386 public void ReportsInnerExceptionForUnexpectedExceptions(BuildSystem buildSystem)
387 {
388 var sourceFolder = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage");
389
390 using (var fs = new TestDataFolderFileSystem())
391 {
392 fs.Initialize(sourceFolder);
393 var baseFolder = fs.BaseFolder;
394 var binFolder = Path.Combine(baseFolder, @"bin\");
395 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
396
397 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
398 {
399 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildUtilities.WixMsbuildPath, "broken", "net461")),
400 }, outOfProc: true);
401 Assert.Equal(1, result.ExitCode);
402
403 var expectedMessage = "System.PlatformNotSupportedException: Could not find platform specific 'wixnative.exe' ---> System.IO.FileNotFoundException: Could not find internal piece of WiX Toolset from";
404 Assert.Contains(result.Output, m => m.Contains(expectedMessage));
405 }
406 }
407 }
408}
diff --git a/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs
new file mode 100644
index 00000000..2f32a30f
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs
@@ -0,0 +1,150 @@
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.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10 using WixToolset.Core.TestPackage;
11 using WixToolset.Data;
12 using WixToolset.Data.Symbols;
13 using Xunit;
14
15 public class MsbuildHeatFixture
16 {
17 [Theory]
18 [InlineData(BuildSystem.DotNetCoreSdk)]
19 [InlineData(BuildSystem.MSBuild)]
20 [InlineData(BuildSystem.MSBuild64)]
21 public void CanBuildHeatFilePackage(BuildSystem buildSystem)
22 {
23 var sourceFolder = TestData.Get(@"TestData\HeatFilePackage");
24
25 using (var fs = new TestDataFolderFileSystem())
26 {
27 fs.Initialize(sourceFolder);
28 var baseFolder = fs.BaseFolder;
29 var binFolder = Path.Combine(baseFolder, @"bin\");
30 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
31 var projectPath = Path.Combine(baseFolder, "HeatFilePackage.wixproj");
32
33 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
34 result.AssertSuccess();
35
36 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
37 Assert.Single(heatCommandLines);
38
39 var warnings = result.Output.Where(line => line.Contains(": warning"));
40 Assert.Empty(warnings);
41
42 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
43 Assert.True(File.Exists(generatedFilePath));
44
45 var generatedContents = File.ReadAllText(generatedFilePath);
46 var testXml = generatedContents.GetTestXml();
47 Assert.Equal(@"<Wix>" +
48 "<Fragment>" +
49 "<DirectoryRef Id='INSTALLFOLDER'>" +
50 "<Component Id='HeatFilePackage.wixproj' Guid='*'>" +
51 "<File Id='HeatFilePackage.wixproj' KeyPath='yes' Source='SourceDir\\HeatFilePackage.wixproj' />" +
52 "</Component>" +
53 "</DirectoryRef>" +
54 "</Fragment>" +
55 "<Fragment>" +
56 "<ComponentGroup Id='ProductComponents'>" +
57 "<ComponentRef Id='HeatFilePackage.wixproj' />" +
58 "</ComponentGroup>" +
59 "</Fragment>" +
60 "</Wix>", testXml);
61
62 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFilePackage.wixpdb");
63 Assert.True(File.Exists(pdbPath));
64
65 var intermediate = Intermediate.Load(pdbPath);
66 var section = intermediate.Sections.Single();
67
68 var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
69 Assert.Equal(@"SourceDir\HeatFilePackage.wixproj", fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
70 }
71 }
72
73 [Theory]
74 [InlineData(BuildSystem.DotNetCoreSdk)]
75 [InlineData(BuildSystem.MSBuild)]
76 [InlineData(BuildSystem.MSBuild64)]
77 public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem)
78 {
79 var sourceFolder = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName");
80
81 using (var fs = new TestDataFolderFileSystem())
82 {
83 fs.Initialize(sourceFolder);
84 var baseFolder = fs.BaseFolder;
85 var binFolder = Path.Combine(baseFolder, @"bin\");
86 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
87 var projectPath = Path.Combine(baseFolder, "HeatFileMultipleFilesSameFileName.wixproj");
88
89 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
90 result.AssertSuccess();
91
92 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
93 Assert.Equal(2, heatCommandLines.Count());
94
95 var warnings = result.Output.Where(line => line.Contains(": warning"));
96 Assert.Empty(warnings);
97
98 var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
99 Assert.True(File.Exists(generatedFilePath));
100
101 var generatedContents = File.ReadAllText(generatedFilePath);
102 var testXml = generatedContents.GetTestXml();
103 Assert.Equal("<Wix>" +
104 "<Fragment>" +
105 "<DirectoryRef Id='INSTALLFOLDER'>" +
106 "<Component Id='MyProgram.txt' Guid='*'>" +
107 @"<File Id='MyProgram.txt' KeyPath='yes' Source='SourceDir\MyProgram.txt' />" +
108 "</Component>" +
109 "</DirectoryRef>" +
110 "</Fragment>" +
111 "<Fragment>" +
112 "<ComponentGroup Id='TxtProductComponents'>" +
113 "<ComponentRef Id='MyProgram.txt' />" +
114 "</ComponentGroup>" +
115 "</Fragment>" +
116 "</Wix>", testXml);
117
118 generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
119 Assert.True(File.Exists(generatedFilePath));
120
121 generatedContents = File.ReadAllText(generatedFilePath);
122 testXml = generatedContents.GetTestXml();
123 Assert.Equal("<Wix>" +
124 "<Fragment>" +
125 "<DirectoryRef Id='INSTALLFOLDER'>" +
126 "<Component Id='MyProgram.json' Guid='*'>" +
127 @"<File Id='MyProgram.json' KeyPath='yes' Source='SourceDir\MyProgram.json' />" +
128 "</Component>" +
129 "</DirectoryRef>" +
130 "</Fragment>" +
131 "<Fragment>" +
132 "<ComponentGroup Id='JsonProductComponents'>" +
133 "<ComponentRef Id='MyProgram.json' />" +
134 "</ComponentGroup>" +
135 "</Fragment>" +
136 "</Wix>", testXml);
137
138 var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFileMultipleFilesSameFileName.wixpdb");
139 Assert.True(File.Exists(pdbPath));
140
141 var intermediate = Intermediate.Load(pdbPath);
142 var section = intermediate.Sections.Single();
143
144 var fileSymbols = section.Symbols.OfType<FileSymbol>().ToArray();
145 Assert.Equal(@"SourceDir\MyProgram.txt", fileSymbols[0][FileSymbolFields.Source].PreviousValue.AsPath().Path);
146 Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path);
147 }
148 }
149 }
150}
diff --git a/src/test/WixToolsetTest.Sdk/MsbuildUtilities.cs b/src/test/WixToolsetTest.Sdk/MsbuildUtilities.cs
new file mode 100644
index 00000000..cfb421b2
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/MsbuildUtilities.cs
@@ -0,0 +1,98 @@
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.Sdk
4{
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 using System.Linq;
9 using WixBuildTools.TestSupport;
10
11 public enum BuildSystem
12 {
13 DotNetCoreSdk,
14 MSBuild,
15 MSBuild64,
16 }
17
18 public static class MsbuildUtilities
19 {
20 public static readonly string WixMsbuildPath = Path.Combine(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.Sdk");
21 public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props");
22
23 public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal")
24 {
25 var allArgs = new List<string>
26 {
27 $"-verbosity:{verbosityLevel}",
28 $"-p:Configuration={configuration}",
29 GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildUtilities.WixPropsPath),
30 // Node reuse means that child msbuild processes can stay around after the build completes.
31 // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang.
32 "-nr:false",
33 };
34
35 if (outOfProc.HasValue)
36 {
37 allArgs.Add($"-p:RunWixToolsOutOfProc={outOfProc.Value}");
38 }
39
40 if (arguments != null)
41 {
42 allArgs.AddRange(arguments);
43 }
44
45 switch (buildSystem)
46 {
47 case BuildSystem.DotNetCoreSdk:
48 {
49 allArgs.Add(projectPath);
50 var result = DotnetRunner.Execute("msbuild", allArgs.ToArray());
51 return new MsbuildRunnerResult
52 {
53 ExitCode = result.ExitCode,
54 Output = result.StandardOutput,
55 };
56 }
57 case BuildSystem.MSBuild:
58 case BuildSystem.MSBuild64:
59 {
60 return MsbuildRunner.Execute(projectPath, allArgs.ToArray(), buildSystem == BuildSystem.MSBuild64);
61 }
62 default:
63 {
64 throw new NotImplementedException();
65 }
66 }
67 }
68
69 public static string GetQuotedPropertySwitch(BuildSystem buildSystem, string propertyName, string valueToQuote)
70 {
71 switch (buildSystem)
72 {
73 case BuildSystem.DotNetCoreSdk:
74 {
75 return $"-p:{propertyName}=\\\"{valueToQuote}\\\"";
76 }
77 case BuildSystem.MSBuild:
78 case BuildSystem.MSBuild64:
79 {
80 return $"-p:{propertyName}=\"{valueToQuote}\"";
81 }
82 default:
83 {
84 throw new NotImplementedException();
85 }
86 }
87 }
88
89 public static IEnumerable<string> GetToolCommandLines(MsbuildRunnerResult result, string toolName, string operation, BuildSystem buildSystem, bool? outOfProc = null)
90 {
91 var expectedOutOfProc = buildSystem == BuildSystem.DotNetCoreSdk || outOfProc.HasValue && outOfProc.Value;
92 var expectedToolExe = !expectedOutOfProc ? $"({toolName}.exe)" :
93 buildSystem == BuildSystem.DotNetCoreSdk ? $"{toolName}.dll\"" : $"{toolName}.exe";
94 var expectedToolCommand = $"{expectedToolExe} {operation}";
95 return result.Output.Where(line => line.Contains(expectedToolCommand));
96 }
97 }
98}
diff --git a/src/test/WixToolsetTest.Sdk/README.md b/src/test/WixToolsetTest.Sdk/README.md
new file mode 100644
index 00000000..7faf34b9
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/README.md
@@ -0,0 +1,5 @@
1In order to properly test wix.targets,
2all of the supported architectures for WixToolset.BuildTasks need to be available in the layout used in the Nuget package.
3Making this happen on every build for the solution takes too long,
4so this project relies on manually running appveyor.cmd to publish everything before the tests can be run.
5appveyor.cmd needs to be ran again every time changes are made in other projects, including the targets themselves. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
new file mode 100644
index 00000000..7d751319
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj
@@ -0,0 +1,58 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
42 </PropertyGroup>
43
44 <ItemGroup>
45 <HarvestFile Include="MyProgram.txt">
46 <ComponentGroupName>TxtProductComponents</ComponentGroupName>
47 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
48 <SuppressRootDirectory>true</SuppressRootDirectory>
49 </HarvestFile>
50 <HarvestFile Include="MyProgram.json">
51 <ComponentGroupName>JsonProductComponents</ComponentGroupName>
52 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
53 <SuppressRootDirectory>true</SuppressRootDirectory>
54 </HarvestFile>
55 </ItemGroup>
56
57 <Import Project="$(WixTargetsPath)" />
58</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
new file mode 100644
index 00000000..5f282702
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt
@@ -0,0 +1 @@
 \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
new file mode 100644
index 00000000..884da274
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/Package.wxs
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Product Id="*" Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
5 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
6
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="HeatFileFeature">
10 <ComponentGroupRef Id="TxtProductComponents" />
11 <ComponentGroupRef Id="JsonProductComponents" />
12 </Feature>
13 </Product>
14
15 <Fragment>
16 <Directory Id="TARGETDIR" Name="SourceDir">
17 <Directory Id="ProgramFilesFolder">
18 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
19 </Directory>
20 </Directory>
21 </Fragment>
22</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj
new file mode 100644
index 00000000..3988acaf
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj
@@ -0,0 +1,53 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <BindInputPaths Include="." />
38 </ItemGroup>
39
40 <PropertyGroup>
41 <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
42 </PropertyGroup>
43
44 <ItemGroup>
45 <HarvestFile Include="HeatFilePackage.wixproj">
46 <ComponentGroupName>ProductComponents</ComponentGroupName>
47 <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
48 <SuppressRootDirectory>true</SuppressRootDirectory>
49 </HarvestFile>
50 </ItemGroup>
51
52 <Import Project="$(WixTargetsPath)" />
53</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
new file mode 100644
index 00000000..e509c464
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/Package.wxs
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
4 <Product Id="*" Name="HeatFilePackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
5 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
6
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="HeatFileFeature">
10 <ComponentGroupRef Id="ProductComponents" />
11 </Feature>
12 </Product>
13
14 <Fragment>
15 <Directory Id="TARGETDIR" Name="SourceDir">
16 <Directory Id="ProgramFilesFolder">
17 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
18 </Directory>
19 </Directory>
20 </Fragment>
21</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj
new file mode 100644
index 00000000..77ee4420
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/MergeMsiPackage.wixproj
@@ -0,0 +1,44 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>{B00939D5-7952-4ADF-BEB1-507D227B2FE2}</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 </ItemGroup>
35
36 <ItemGroup>
37 <ProjectReference Include="..\SimpleMergeModule\SimpleMergeModule.wixproj">
38 <Name>SimpleMergeModule</Name>
39 <Project>{9F84998B-7F45-4CB3-8795-915801DBBB74}</Project>
40 </ProjectReference>
41 </ItemGroup>
42
43 <Import Project="$(WixTargetsPath)" />
44</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
new file mode 100644
index 00000000..1c25e684
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/MergeMsiPackage/Package.wxs
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
5
6 <MediaTemplate />
7
8 <Feature Id="ProductFeature" Title="ATitle">
9 <MergeRef Id="SimpleMM" />
10 </Feature>
11 </Product>
12
13 <Fragment>
14 <Directory Id="TARGETDIR" Name="SourceDir">
15 <Directory Id="ProgramFilesFolder">
16 <Directory Id="INSTALLFOLDER" Name="MsiPackage">
17 <Merge Id="SimpleMM" Language="1033" SourceFile="$(var.SimpleMergeModule.TargetPath)" DiskId="1" />
18 </Directory>
19 </Directory>
20 </Directory>
21 </Fragment>
22</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
new file mode 100644
index 00000000..b9ab953a
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/MergeModule.wxs
@@ -0,0 +1,22 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Module Id="SimpleMM" Language="1033" Version="1.0.0.0">
4 <Package Id="86FB9E91-ACF3-4EDF-B711-72DAF2443692" InstallerVersion="200" Manufacturer="Example Corporation" />
5
6 <ComponentGroupRef Id="ProductComponents" />
7 </Module>
8
9 <Fragment>
10 <Directory Id="TARGETDIR" Name="SourceDir">
11 <Directory Id="MergeRedirectFolder" />
12 </Directory>
13 </Fragment>
14
15 <Fragment>
16 <ComponentGroup Id="ProductComponents" Directory="MergeRedirectFolder">
17 <Component Id="MMtxt" Guid="2D93B748-4926-4185-BC84-9F1D6883AF20">
18 <File Source="MergeModule.txt" />
19 </Component>
20 </ComponentGroup>
21 </Fragment>
22</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj
new file mode 100644
index 00000000..91579790
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/SimpleMergeModule.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 <OutputType>Module</OutputType>
8 </PropertyGroup>
9
10 <PropertyGroup>
11 <ProjectGuid>{9F84998B-7F45-4CB3-8795-915801DBBB74}</ProjectGuid>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="MergeModule.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MergeModule/SimpleMergeModule/data/MergeModule.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
new file mode 100644
index 00000000..555addbe
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -0,0 +1,50 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 <ProductVersion>0.9</ProductVersion>
8 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
9 <OutputName>MsiPackage</OutputName>
10 <OutputType>Package</OutputType>
11 <Name>MsiPackage</Name>
12 <RootNamespace>MsiPackage</RootNamespace>
13 <Cultures>en-US,en;de-DE</Cultures>
14 </PropertyGroup>
15
16 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
17 <PlatformName>$(Platform)</PlatformName>
18 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
19 <DefineConstants>Debug</DefineConstants>
20 </PropertyGroup>
21 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
22 <PlatformName>$(Platform)</PlatformName>
23 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
24 </PropertyGroup>
25 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
26 <PlatformName>$(Platform)</PlatformName>
27 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
28 <DefineConstants>Debug</DefineConstants>
29 </PropertyGroup>
30 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
31 <PlatformName>$(Platform)</PlatformName>
32 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
33 </PropertyGroup>
34
35 <ItemGroup>
36 <Compile Include="Package.wxs" />
37 <Compile Include="PackageComponents.wxs" />
38 </ItemGroup>
39
40 <ItemGroup>
41 <EmbeddedResource Include="Package.en-us.wxl" />
42 <EmbeddedResource Include="Package.de-de.wxl" />
43 </ItemGroup>
44
45 <ItemGroup>
46 <BindInputPaths Include="data" />
47 </ItemGroup>
48
49 <Import Project="$(WixTargetsPath)" />
50</Project>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
new file mode 100644
index 00000000..23493ace
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="de-DE">
7
8 <String Id="DowngradeError">German DowngradeError</String>
9 <String Id="FeatureTitle">German FeatureTitle</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
8 <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 <String Id="FeatureTitle">MsiPackage</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
new file mode 100644
index 00000000..d5a5a40d
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs
@@ -0,0 +1,21 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
4 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7 <MediaTemplate />
8
9 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
10 <ComponentGroupRef Id="ProductComponents" />
11 </Feature>
12 </Product>
13
14 <Fragment>
15 <Directory Id="TARGETDIR" Name="SourceDir">
16 <Directory Id="ProgramFilesFolder">
17 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
18 </Directory>
19 </Directory>
20 </Fragment>
21</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs
new file mode 100644
index 00000000..e26c4509
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 <Component>
6 <File Source="test.txt" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln
new file mode 100644
index 00000000..2c88704e
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln
@@ -0,0 +1,31 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio 15
4VisualStudioVersion = 15.0.26730.8
5MinimumVisualStudioVersion = 10.0.40219.1
6Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}"
7EndProject
8Global
9 GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 Debug|x64 = Debug|x64
11 Debug|x86 = Debug|x86
12 Release|x64 = Release|x64
13 Release|x86 = Release|x86
14 EndGlobalSection
15 GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.ActiveCfg = Debug|x64
17 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.Build.0 = Debug|x64
18 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.ActiveCfg = Debug|x86
19 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.Build.0 = Debug|x86
20 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.ActiveCfg = Release|x64
21 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.Build.0 = Release|x64
22 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.ActiveCfg = Release|x86
23 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.Build.0 = Release|x86
24 EndGlobalSection
25 GlobalSection(SolutionProperties) = preSolution
26 HideSolutionNode = FALSE
27 EndGlobalSection
28 GlobalSection(ExtensibilityGlobals) = postSolution
29 SolutionGuid = {585B0599-4EB5-4AB6-BC66-819CC78B63D5}
30 EndGlobalSection
31EndGlobal
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
new file mode 100644
index 00000000..18ae08b2
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj
@@ -0,0 +1,46 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid>
11 </PropertyGroup>
12
13 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
14 <PlatformName>$(Platform)</PlatformName>
15 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
16 <DefineConstants>Debug</DefineConstants>
17 </PropertyGroup>
18 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
19 <PlatformName>$(Platform)</PlatformName>
20 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
21 </PropertyGroup>
22 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
23 <PlatformName>$(Platform)</PlatformName>
24 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
25 <DefineConstants>Debug</DefineConstants>
26 </PropertyGroup>
27 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
28 <PlatformName>$(Platform)</PlatformName>
29 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
30 </PropertyGroup>
31
32 <ItemGroup>
33 <Compile Include="Package.wxs" />
34 <Compile Include="PackageComponents.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <EmbeddedResource Include="Package.en-us.wxl" />
39 </ItemGroup>
40
41 <ItemGroup>
42 <BindInputPaths Include="data" />
43 </ItemGroup>
44
45 <Import Project="$(WixTargetsPath)" />
46</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl
new file mode 100644
index 00000000..38c12ac1
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<!--
4This file contains the declaration of all the localizable strings.
5-->
6<WixLocalization xmlns="http://wixtoolset.org/schemas/v4/wxl" Culture="en-US">
7
8 <String Id="DowngradeError">A newer version of [ProductName] is already installed.</String>
9 <String Id="FeatureTitle">MsiPackage</String>
10
11</WixLocalization>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
new file mode 100644
index 00000000..f7998fff
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/Package.wxs
@@ -0,0 +1,25 @@
1<?xml version="1.0" encoding="utf-8"?>
2
3<?define Variable = "Value" ?>
4<?define Variable = "DifferentValue" ?>
5
6<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
7 <Product Id="*" Name="MsiPackage" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
8 <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
9
10 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
11 <MediaTemplate />
12
13 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
14 <ComponentGroupRef Id="ProductComponents" />
15 </Feature>
16 </Product>
17
18 <Fragment>
19 <Directory Id="TARGETDIR" Name="SourceDir">
20 <Directory Id="ProgramFilesFolder">
21 <Directory Id="INSTALLFOLDER" Name="MsiPackage" />
22 </Directory>
23 </Directory>
24 </Fragment>
25</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs
new file mode 100644
index 00000000..ddb95faf
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Fragment>
4 <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
5 <Component>
6 <File Source="test.txt" DefaultLanguage="1033" />
7 </Component>
8 </ComponentGroup>
9 </Fragment>
10</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt
new file mode 100644
index 00000000..cd0db0e1
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/MsiPackage/data/test.txt
@@ -0,0 +1 @@
This is test.txt. \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs
new file mode 100644
index 00000000..6cd04712
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs
@@ -0,0 +1,10 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
3 <Bundle Name="SimpleBundle" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="6670d5c9-bbec-4828-ab60-4a1c0ffeb97d">
4 <BootstrapperApplication SourceFile="test.txt" />
5
6 <Chain>
7 <ExePackage SourceFile="test.txt" />
8 </Chain>
9 </Bundle>
10</Wix>
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj
new file mode 100644
index 00000000..199eb6d9
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj
@@ -0,0 +1,42 @@
1<?xml version="1.0" encoding="utf-8"?>
2<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3 <Import Project="$(WixMSBuildProps)" />
4 <PropertyGroup>
5 <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6 <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
7 </PropertyGroup>
8
9 <PropertyGroup>
10 <ProjectGuid>6670d5c9-bbec-4828-ab60-4a1c0ffeb97d</ProjectGuid>
11 <OutputType>Bundle</OutputType>
12 </PropertyGroup>
13
14 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
15 <PlatformName>$(Platform)</PlatformName>
16 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
17 <DefineConstants>Debug</DefineConstants>
18 </PropertyGroup>
19 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
20 <PlatformName>$(Platform)</PlatformName>
21 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
22 </PropertyGroup>
23 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
24 <PlatformName>$(Platform)</PlatformName>
25 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
26 <DefineConstants>Debug</DefineConstants>
27 </PropertyGroup>
28 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
29 <PlatformName>$(Platform)</PlatformName>
30 <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
31 </PropertyGroup>
32
33 <ItemGroup>
34 <Compile Include="Bundle.wxs" />
35 </ItemGroup>
36
37 <ItemGroup>
38 <BindInputPaths Include="..\MsiPackage\data" />
39 </ItemGroup>
40
41 <Import Project="$(WixTargetsPath)" />
42</Project> \ No newline at end of file
diff --git a/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln
new file mode 100644
index 00000000..dd21489d
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/TestData/SimpleMsiPackage/SimpleMsiPackage.sln
@@ -0,0 +1,39 @@
1
2Microsoft Visual Studio Solution File, Format Version 12.00
3# Visual Studio Version 16
4VisualStudioVersion = 16.0.30011.22
5MinimumVisualStudioVersion = 10.0.40219.1
6Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}"
7EndProject
8Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SimpleBundle", "SimpleBundle\SimpleBundle.wixproj", "{6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}"
9EndProject
10Global
11 GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 Debug|x64 = Debug|x64
13 Debug|x86 = Debug|x86
14 Release|x64 = Release|x64
15 Release|x86 = Release|x86
16 EndGlobalSection
17 GlobalSection(ProjectConfigurationPlatforms) = postSolution
18 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.ActiveCfg = Debug|x64
19 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x64.Build.0 = Debug|x64
20 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.ActiveCfg = Debug|x86
21 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Debug|x86.Build.0 = Debug|x86
22 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.ActiveCfg = Release|x64
23 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x64.Build.0 = Release|x64
24 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.ActiveCfg = Release|x86
25 {7FB77005-C6E0-454F-8C2D-0A4A79C918BA}.Release|x86.Build.0 = Release|x86
26 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x64.ActiveCfg = Debug|x86
27 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x86.ActiveCfg = Debug|x86
28 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Debug|x86.Build.0 = Debug|x86
29 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x64.ActiveCfg = Release|x86
30 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x86.ActiveCfg = Release|x86
31 {6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}.Release|x86.Build.0 = Release|x86
32 EndGlobalSection
33 GlobalSection(SolutionProperties) = preSolution
34 HideSolutionNode = FALSE
35 EndGlobalSection
36 GlobalSection(ExtensibilityGlobals) = postSolution
37 SolutionGuid = {585B0599-4EB5-4AB6-BC66-819CC78B63D5}
38 EndGlobalSection
39EndGlobal
diff --git a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
new file mode 100644
index 00000000..916300af
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
@@ -0,0 +1,48 @@
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 <PropertyGroup>
6 <TargetFramework>net461</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 </PropertyGroup>
10
11 <ItemGroup>
12 <Content Include="TestData\HeatFilePackage\HeatFilePackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
13 <Content Include="TestData\HeatFilePackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
14 <Content Include="TestData\HeatFileMultipleFilesSameFileName\HeatFileMultipleFilesSameFileName.wixproj" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="TestData\HeatFileMultipleFilesSameFileName\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.txt" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.json" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\MergeModule\MergeMsiPackage\MergeMsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
19 <Content Include="TestData\MergeModule\MergeMsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
20 <Content Include="TestData\MergeModule\SimpleMergeModule\data\MergeModule.txt" CopyToOutputDirectory="PreserveNewest" />
21 <Content Include="TestData\MergeModule\SimpleMergeModule\MergeModule.wxs" CopyToOutputDirectory="PreserveNewest" />
22 <Content Include="TestData\MergeModule\SimpleMergeModule\SimpleMergeModule.wixproj" CopyToOutputDirectory="PreserveNewest" />
23 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
24 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.de-de.wxl" CopyToOutputDirectory="PreserveNewest" />
25 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
26 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
30 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" />
31 <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
32 <Content Include="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" />
33 <Content Include="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" />
34 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" />
35 <Content Include="TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj" CopyToOutputDirectory="PreserveNewest" />
36 </ItemGroup>
37
38 <ItemGroup>
39 <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" />
40 <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" />
41 </ItemGroup>
42
43 <ItemGroup>
44 <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" />
45 <PackageReference Include="xunit" Version="2.4.1" />
46 <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" />
47 </ItemGroup>
48</Project>
diff --git a/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject
new file mode 100644
index 00000000..f1d03cd7
--- /dev/null
+++ b/src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.v3.ncrunchproject
@@ -0,0 +1,8 @@
1<ProjectConfiguration>
2 <Settings>
3 <HiddenComponentWarnings />
4 <IgnoredTests>
5 <AllTestsSelector />
6 </IgnoredTests>
7 </Settings>
8</ProjectConfiguration> \ No newline at end of file