diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-05-30 18:55:10 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-05-31 15:11:21 +1000 |
| commit | 64fe8bccc329ac5dc0d510bfbd73054d478ddc37 (patch) | |
| tree | 21cc3d21b3b3a689e434f5a387ad98551eb3486c /src/test/WixToolsetTest.MSBuild | |
| parent | 2b9f1c20452b582af1962449e0b662d6ec942728 (diff) | |
| download | wix-64fe8bccc329ac5dc0d510bfbd73054d478ddc37.tar.gz wix-64fe8bccc329ac5dc0d510bfbd73054d478ddc37.tar.bz2 wix-64fe8bccc329ac5dc0d510bfbd73054d478ddc37.zip | |
Move most tests into the new WixToolsetTest.MSBuild project.
This project relies on all of the projects being published in order to properly test wix.targets.
Diffstat (limited to 'src/test/WixToolsetTest.MSBuild')
26 files changed, 991 insertions, 0 deletions
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs new file mode 100644 index 00000000..85f111a9 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/MsbuildFixture.cs | |||
| @@ -0,0 +1,293 @@ | |||
| 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 | |||
| 3 | namespace WixToolsetTest.MSBuild | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.IO; | ||
| 7 | using System.Linq; | ||
| 8 | using WixBuildTools.TestSupport; | ||
| 9 | using Xunit; | ||
| 10 | |||
| 11 | public class MsbuildFixture | ||
| 12 | { | ||
| 13 | private static readonly string WixTargetsPath = Path.Combine(new Uri(typeof(MsbuildFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "tools", "wix.targets"); | ||
| 14 | |||
| 15 | [Fact] | ||
| 16 | public void CanBuildSimpleBundle() | ||
| 17 | { | ||
| 18 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj"); | ||
| 19 | |||
| 20 | using (var fs = new DisposableFileSystem()) | ||
| 21 | { | ||
| 22 | var baseFolder = fs.GetFolder(); | ||
| 23 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 24 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 25 | |||
| 26 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 27 | { | ||
| 28 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 29 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 30 | $"-p:OutputPath={binFolder}" | ||
| 31 | }); | ||
| 32 | result.AssertSuccess(); | ||
| 33 | |||
| 34 | var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x86")); | ||
| 35 | Assert.Single(platformSwitches); | ||
| 36 | |||
| 37 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
| 38 | Assert.Empty(warnings); | ||
| 39 | |||
| 40 | var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | ||
| 41 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 42 | .OrderBy(s => s) | ||
| 43 | .ToArray(); | ||
| 44 | Assert.Equal(new[] | ||
| 45 | { | ||
| 46 | @"bin\SimpleBundle.exe", | ||
| 47 | @"bin\SimpleBundle.wixpdb", | ||
| 48 | }, paths); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | [Fact] | ||
| 53 | public void CanBuildSimpleMsiPackage() | ||
| 54 | { | ||
| 55 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 56 | |||
| 57 | using (var fs = new DisposableFileSystem()) | ||
| 58 | { | ||
| 59 | var baseFolder = fs.GetFolder(); | ||
| 60 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 61 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 62 | |||
| 63 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 64 | { | ||
| 65 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 66 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 67 | $"-p:OutputPath={binFolder}" | ||
| 68 | }); | ||
| 69 | result.AssertSuccess(); | ||
| 70 | |||
| 71 | var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x86")); | ||
| 72 | Assert.Single(platformSwitches); | ||
| 73 | |||
| 74 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
| 75 | Assert.Equal(4, warnings.Count()); | ||
| 76 | |||
| 77 | var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | ||
| 78 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 79 | .OrderBy(s => s) | ||
| 80 | .ToArray(); | ||
| 81 | Assert.Equal(new[] | ||
| 82 | { | ||
| 83 | @"bin\en-US\cab1.cab", | ||
| 84 | @"bin\en-US\MsiPackage.msi", | ||
| 85 | @"bin\en-US\MsiPackage.wixpdb", | ||
| 86 | }, paths); | ||
| 87 | } | ||
| 88 | } | ||
| 89 | |||
| 90 | [Fact] | ||
| 91 | public void CanBuildWithDefaultAndExplicitlyFullWixpdbs() | ||
| 92 | { | ||
| 93 | var expectedOutputs = new[] | ||
| 94 | { | ||
| 95 | @"bin\en-US\cab1.cab", | ||
| 96 | @"bin\en-US\MsiPackage.msi", | ||
| 97 | @"bin\en-US\MsiPackage.wixpdb", | ||
| 98 | }; | ||
| 99 | |||
| 100 | this.AssertWixpdb(null, expectedOutputs); | ||
| 101 | this.AssertWixpdb("Full", expectedOutputs); | ||
| 102 | } | ||
| 103 | |||
| 104 | [Fact] | ||
| 105 | public void CanBuildWithNoWixpdb() | ||
| 106 | { | ||
| 107 | this.AssertWixpdb("NONE", new[] | ||
| 108 | { | ||
| 109 | @"bin\en-US\cab1.cab", | ||
| 110 | @"bin\en-US\MsiPackage.msi", | ||
| 111 | }); | ||
| 112 | } | ||
| 113 | |||
| 114 | private void AssertWixpdb(string wixpdbType, string[] expectedOutputFiles) | ||
| 115 | { | ||
| 116 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 117 | |||
| 118 | using (var fs = new DisposableFileSystem()) | ||
| 119 | { | ||
| 120 | var baseFolder = fs.GetFolder(); | ||
| 121 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 122 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 123 | |||
| 124 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 125 | { | ||
| 126 | wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}", | ||
| 127 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 128 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 129 | $"-p:OutputPath={binFolder}", | ||
| 130 | }); | ||
| 131 | result.AssertSuccess(); | ||
| 132 | |||
| 133 | var paths = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | ||
| 134 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 135 | .OrderBy(s => s) | ||
| 136 | .ToArray(); | ||
| 137 | Assert.Equal(expectedOutputFiles, paths); | ||
| 138 | } | ||
| 139 | } | ||
| 140 | |||
| 141 | [Fact] | ||
| 142 | public void CanBuild64BitMsiPackage() | ||
| 143 | { | ||
| 144 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 145 | |||
| 146 | using (var fs = new DisposableFileSystem()) | ||
| 147 | { | ||
| 148 | var baseFolder = fs.GetFolder(); | ||
| 149 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 150 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 151 | |||
| 152 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 153 | { | ||
| 154 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 155 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 156 | $"-p:OutputPath={binFolder}", | ||
| 157 | $"-p:InstallerPlatform=x64", | ||
| 158 | }); | ||
| 159 | result.AssertSuccess(); | ||
| 160 | |||
| 161 | var platformSwitches = result.Output.Where(line => line.TrimStart().StartsWith("wix.exe build -platform x64")); | ||
| 162 | Assert.Single(platformSwitches); | ||
| 163 | } | ||
| 164 | } | ||
| 165 | |||
| 166 | [Fact(Skip = "Currently fails")] | ||
| 167 | public void CanBuildSimpleMsiPackageWithIceSuppressions() | ||
| 168 | { | ||
| 169 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 170 | |||
| 171 | using (var fs = new DisposableFileSystem()) | ||
| 172 | { | ||
| 173 | var baseFolder = fs.GetFolder(); | ||
| 174 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 175 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 176 | |||
| 177 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 178 | { | ||
| 179 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 180 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 181 | $"-p:OutputPath={binFolder}", | ||
| 182 | "-p:SuppressIces=\"ICE45;ICE46\"" | ||
| 183 | }); | ||
| 184 | result.AssertSuccess(); | ||
| 185 | } | ||
| 186 | } | ||
| 187 | |||
| 188 | [Fact] | ||
| 189 | public void CanBuildSimpleMsiPackageWithWarningSuppressions() | ||
| 190 | { | ||
| 191 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 192 | |||
| 193 | using (var fs = new DisposableFileSystem()) | ||
| 194 | { | ||
| 195 | var baseFolder = fs.GetFolder(); | ||
| 196 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 197 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 198 | |||
| 199 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 200 | { | ||
| 201 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 202 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 203 | $"-p:OutputPath={binFolder}", | ||
| 204 | "-p:SuppressSpecificWarnings=\"1118;1102\"" | ||
| 205 | }); | ||
| 206 | result.AssertSuccess(); | ||
| 207 | |||
| 208 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
| 209 | Assert.Empty(warnings); | ||
| 210 | } | ||
| 211 | } | ||
| 212 | |||
| 213 | [Fact] | ||
| 214 | public void CanBuildSimpleMsiPackageAsWixipl() | ||
| 215 | { | ||
| 216 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 217 | |||
| 218 | using (var fs = new DisposableFileSystem()) | ||
| 219 | { | ||
| 220 | var baseFolder = fs.GetFolder(); | ||
| 221 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 222 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 223 | |||
| 224 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 225 | { | ||
| 226 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 227 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 228 | $"-p:OutputPath={binFolder}", | ||
| 229 | "-p:OutputType=IntermediatePostLink" | ||
| 230 | }); | ||
| 231 | result.AssertSuccess(); | ||
| 232 | |||
| 233 | var path = Directory.EnumerateFiles(binFolder, @"*.*", SearchOption.AllDirectories) | ||
| 234 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 235 | .Single(); | ||
| 236 | Assert.Equal(@"bin\MsiPackage.wixipl", path); | ||
| 237 | } | ||
| 238 | } | ||
| 239 | |||
| 240 | [Fact] | ||
| 241 | public void CanBuildAndCleanSimpleMsiPackage() | ||
| 242 | { | ||
| 243 | var projectPath = TestData.Get(@"TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj"); | ||
| 244 | |||
| 245 | using (var fs = new DisposableFileSystem()) | ||
| 246 | { | ||
| 247 | var baseFolder = fs.GetFolder(); | ||
| 248 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 249 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 250 | |||
| 251 | // Build | ||
| 252 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 253 | { | ||
| 254 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 255 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 256 | $"-p:OutputPath={binFolder}", | ||
| 257 | "-v:diag" | ||
| 258 | }); | ||
| 259 | result.AssertSuccess(); | ||
| 260 | |||
| 261 | var buildOutput = String.Join("\r\n", result.Output); | ||
| 262 | |||
| 263 | var createdPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories) | ||
| 264 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 265 | .OrderBy(s => s) | ||
| 266 | .ToArray(); | ||
| 267 | Assert.NotEmpty(createdPaths); | ||
| 268 | |||
| 269 | // Clean | ||
| 270 | result = MsbuildRunner.Execute(projectPath, new[] | ||
| 271 | { | ||
| 272 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 273 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 274 | $"-p:OutputPath={binFolder}", | ||
| 275 | "-t:Clean", | ||
| 276 | "-v:diag" | ||
| 277 | }); | ||
| 278 | result.AssertSuccess(); | ||
| 279 | |||
| 280 | var cleanOutput = String.Join("\r\n", result.Output); | ||
| 281 | |||
| 282 | // Clean is only expected to delete the files listed in {Project}.FileListAbsolute.txt, | ||
| 283 | // so this is not quite right but close enough. | ||
| 284 | var remainingPaths = Directory.EnumerateFiles(baseFolder, @"*.*", SearchOption.AllDirectories) | ||
| 285 | .Select(s => s.Substring(baseFolder.Length + 1)) | ||
| 286 | .Where(s => s != "obj\\MsiPackage.wixproj.FileListAbsolute.txt") | ||
| 287 | .OrderBy(s => s) | ||
| 288 | .ToArray(); | ||
| 289 | Assert.Empty(remainingPaths); | ||
| 290 | } | ||
| 291 | } | ||
| 292 | } | ||
| 293 | } | ||
diff --git a/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs new file mode 100644 index 00000000..fa8acb81 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/MsbuildHeatFixture.cs | |||
| @@ -0,0 +1,151 @@ | |||
| 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 | |||
| 3 | namespace WixToolsetTest.MSBuild | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.IO; | ||
| 7 | using System.Linq; | ||
| 8 | using WixBuildTools.TestSupport; | ||
| 9 | using WixToolset.Core.TestPackage; | ||
| 10 | using WixToolset.Data; | ||
| 11 | using WixToolset.Data.Tuples; | ||
| 12 | using Xunit; | ||
| 13 | |||
| 14 | public class MsbuildHeatFixture | ||
| 15 | { | ||
| 16 | private static readonly string WixTargetsPath = Path.Combine(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath, "..", "..", "publish", "WixToolset.MSBuild", "tools", "wix.targets"); | ||
| 17 | |||
| 18 | [Fact] | ||
| 19 | public void CanBuildHeatFilePackage() | ||
| 20 | { | ||
| 21 | var projectPath = TestData.Get(@"TestData\HeatFilePackage\HeatFilePackage.wixproj"); | ||
| 22 | |||
| 23 | using (var fs = new DisposableFileSystem()) | ||
| 24 | { | ||
| 25 | var baseFolder = fs.GetFolder(); | ||
| 26 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 27 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 28 | |||
| 29 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 30 | { | ||
| 31 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 32 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 33 | $"-p:OutputPath={binFolder}" | ||
| 34 | }); | ||
| 35 | result.AssertSuccess(); | ||
| 36 | |||
| 37 | var heatCommandLines = result.Output.Where(line => line.TrimStart().StartsWith("heat.exe file")); | ||
| 38 | Assert.Single(heatCommandLines); | ||
| 39 | |||
| 40 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
| 41 | Assert.Empty(warnings); | ||
| 42 | |||
| 43 | var generatedFilePath = Path.Combine(intermediateFolder, @"_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs"); | ||
| 44 | Assert.True(File.Exists(generatedFilePath)); | ||
| 45 | |||
| 46 | var generatedContents = File.ReadAllText(generatedFilePath); | ||
| 47 | var testXml = generatedContents.GetTestXml(); | ||
| 48 | Assert.Equal(@"<Wix>" + | ||
| 49 | "<Fragment>" + | ||
| 50 | "<DirectoryRef Id='INSTALLFOLDER'>" + | ||
| 51 | "<Component Id='HeatFilePackage.wixproj' Guid='*'>" + | ||
| 52 | "<File Id='HeatFilePackage.wixproj' KeyPath='yes' Source='SourceDir\\HeatFilePackage.wixproj' />" + | ||
| 53 | "</Component>" + | ||
| 54 | "</DirectoryRef>" + | ||
| 55 | "</Fragment>" + | ||
| 56 | "<Fragment>" + | ||
| 57 | "<ComponentGroup Id='ProductComponents'>" + | ||
| 58 | "<ComponentRef Id='HeatFilePackage.wixproj' />" + | ||
| 59 | "</ComponentGroup>" + | ||
| 60 | "</Fragment>" + | ||
| 61 | "</Wix>", testXml); | ||
| 62 | |||
| 63 | var pdbPath = Path.Combine(binFolder, "HeatFilePackage.wixpdb"); | ||
| 64 | Assert.True(File.Exists(pdbPath)); | ||
| 65 | |||
| 66 | var intermediate = Intermediate.Load(pdbPath); | ||
| 67 | var section = intermediate.Sections.Single(); | ||
| 68 | |||
| 69 | var fileTuple = section.Tuples.OfType<FileTuple>().Single(); | ||
| 70 | Assert.Equal(@"SourceDir\HeatFilePackage.wixproj", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 71 | } | ||
| 72 | } | ||
| 73 | |||
| 74 | [Fact] | ||
| 75 | public void CanBuildHeatFileWithMultipleFilesPackage() | ||
| 76 | { | ||
| 77 | var projectPath = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName\HeatFileMultipleFilesSameFileName.wixproj"); | ||
| 78 | |||
| 79 | using (var fs = new DisposableFileSystem()) | ||
| 80 | { | ||
| 81 | var baseFolder = fs.GetFolder(); | ||
| 82 | var binFolder = Path.Combine(baseFolder, @"bin\"); | ||
| 83 | var intermediateFolder = Path.Combine(baseFolder, @"obj\"); | ||
| 84 | |||
| 85 | var result = MsbuildRunner.Execute(projectPath, new[] | ||
| 86 | { | ||
| 87 | $"-p:WixTargetsPath={WixTargetsPath}", | ||
| 88 | $"-p:IntermediateOutputPath={intermediateFolder}", | ||
| 89 | $"-p:OutputPath={binFolder}" | ||
| 90 | }); | ||
| 91 | result.AssertSuccess(); | ||
| 92 | |||
| 93 | var heatCommandLines = result.Output.Where(line => line.TrimStart().StartsWith("heat.exe file")); | ||
| 94 | Assert.Equal(2, heatCommandLines.Count()); | ||
| 95 | |||
| 96 | var warnings = result.Output.Where(line => line.Contains(": warning")); | ||
| 97 | Assert.Empty(warnings); | ||
| 98 | |||
| 99 | var generatedFilePath = Path.Combine(intermediateFolder, @"_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs"); | ||
| 100 | Assert.True(File.Exists(generatedFilePath)); | ||
| 101 | |||
| 102 | var generatedContents = File.ReadAllText(generatedFilePath); | ||
| 103 | var testXml = generatedContents.GetTestXml(); | ||
| 104 | Assert.Equal("<Wix>" + | ||
| 105 | "<Fragment>" + | ||
| 106 | "<DirectoryRef Id='INSTALLFOLDER'>" + | ||
| 107 | "<Component Id='MyProgram.txt' Guid='*'>" + | ||
| 108 | @"<File Id='MyProgram.txt' KeyPath='yes' Source='SourceDir\MyProgram.txt' />" + | ||
| 109 | "</Component>" + | ||
| 110 | "</DirectoryRef>" + | ||
| 111 | "</Fragment>" + | ||
| 112 | "<Fragment>" + | ||
| 113 | "<ComponentGroup Id='TxtProductComponents'>" + | ||
| 114 | "<ComponentRef Id='MyProgram.txt' />" + | ||
| 115 | "</ComponentGroup>" + | ||
| 116 | "</Fragment>" + | ||
| 117 | "</Wix>", testXml); | ||
| 118 | |||
| 119 | generatedFilePath = Path.Combine(intermediateFolder, @"_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs"); | ||
| 120 | Assert.True(File.Exists(generatedFilePath)); | ||
| 121 | |||
| 122 | generatedContents = File.ReadAllText(generatedFilePath); | ||
| 123 | testXml = generatedContents.GetTestXml(); | ||
| 124 | Assert.Equal("<Wix>" + | ||
| 125 | "<Fragment>" + | ||
| 126 | "<DirectoryRef Id='INSTALLFOLDER'>" + | ||
| 127 | "<Component Id='MyProgram.json' Guid='*'>" + | ||
| 128 | @"<File Id='MyProgram.json' KeyPath='yes' Source='SourceDir\MyProgram.json' />" + | ||
| 129 | "</Component>" + | ||
| 130 | "</DirectoryRef>" + | ||
| 131 | "</Fragment>" + | ||
| 132 | "<Fragment>" + | ||
| 133 | "<ComponentGroup Id='JsonProductComponents'>" + | ||
| 134 | "<ComponentRef Id='MyProgram.json' />" + | ||
| 135 | "</ComponentGroup>" + | ||
| 136 | "</Fragment>" + | ||
| 137 | "</Wix>", testXml); | ||
| 138 | |||
| 139 | var pdbPath = Path.Combine(binFolder, "HeatFileMultipleFilesSameFileName.wixpdb"); | ||
| 140 | Assert.True(File.Exists(pdbPath)); | ||
| 141 | |||
| 142 | var intermediate = Intermediate.Load(pdbPath); | ||
| 143 | var section = intermediate.Sections.Single(); | ||
| 144 | |||
| 145 | var fileTuples = section.Tuples.OfType<FileTuple>().ToArray(); | ||
| 146 | Assert.Equal(@"SourceDir\MyProgram.txt", fileTuples[0][FileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 147 | Assert.Equal(@"SourceDir\MyProgram.json", fileTuples[1][FileTupleFields.Source].PreviousValue.AsPath().Path); | ||
| 148 | } | ||
| 149 | } | ||
| 150 | } | ||
| 151 | } | ||
diff --git a/src/test/WixToolsetTest.MSBuild/README.md b/src/test/WixToolsetTest.MSBuild/README.md new file mode 100644 index 00000000..7faf34b9 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/README.md | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | In order to properly test wix.targets, | ||
| 2 | all of the supported architectures for WixToolset.BuildTasks need to be available in the layout used in the Nuget package. | ||
| 3 | Making this happen on every build for the solution takes too long, | ||
| 4 | so this project relies on manually running appveyor.cmd to publish everything before the tests can be run. | ||
| 5 | appveyor.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.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj new file mode 100644 index 00000000..860fc2dd --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | </PropertyGroup> | ||
| 7 | |||
| 8 | <PropertyGroup> | ||
| 9 | <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid> | ||
| 10 | </PropertyGroup> | ||
| 11 | |||
| 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
| 13 | <PlatformName>$(Platform)</PlatformName> | ||
| 14 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 15 | <DefineConstants>Debug</DefineConstants> | ||
| 16 | </PropertyGroup> | ||
| 17 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
| 18 | <PlatformName>$(Platform)</PlatformName> | ||
| 19 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 20 | </PropertyGroup> | ||
| 21 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
| 22 | <PlatformName>$(Platform)</PlatformName> | ||
| 23 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 24 | <DefineConstants>Debug</DefineConstants> | ||
| 25 | </PropertyGroup> | ||
| 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
| 27 | <PlatformName>$(Platform)</PlatformName> | ||
| 28 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 29 | </PropertyGroup> | ||
| 30 | |||
| 31 | <ItemGroup> | ||
| 32 | <Compile Include="Package.wxs" /> | ||
| 33 | </ItemGroup> | ||
| 34 | |||
| 35 | <ItemGroup> | ||
| 36 | <BindInputPaths Include="." /> | ||
| 37 | </ItemGroup> | ||
| 38 | |||
| 39 | <PropertyGroup> | ||
| 40 | <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds> | ||
| 41 | </PropertyGroup> | ||
| 42 | |||
| 43 | <ItemGroup> | ||
| 44 | <HarvestFile Include="MyProgram.txt"> | ||
| 45 | <ComponentGroupName>TxtProductComponents</ComponentGroupName> | ||
| 46 | <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> | ||
| 47 | <SuppressRootDirectory>true</SuppressRootDirectory> | ||
| 48 | </HarvestFile> | ||
| 49 | <HarvestFile Include="MyProgram.json"> | ||
| 50 | <ComponentGroupName>JsonProductComponents</ComponentGroupName> | ||
| 51 | <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> | ||
| 52 | <SuppressRootDirectory>true</SuppressRootDirectory> | ||
| 53 | </HarvestFile> | ||
| 54 | </ItemGroup> | ||
| 55 | |||
| 56 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 57 | <Import Project="$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets') " /> | ||
| 58 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 59 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 60 | </Target> | ||
| 61 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json | |||
| @@ -0,0 +1 @@ | |||
| \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt new file mode 100644 index 00000000..5f282702 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt | |||
| @@ -0,0 +1 @@ | |||
| \ No newline at end of file | |||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/Package.wxs b/src/test/WixToolsetTest.MSBuild/TestData/HeatFileMultipleFilesSameFileName/Package.wxs new file mode 100644 index 00000000..884da274 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj new file mode 100644 index 00000000..87f4388a --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/HeatFilePackage.wixproj | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | </PropertyGroup> | ||
| 7 | |||
| 8 | <PropertyGroup> | ||
| 9 | <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid> | ||
| 10 | </PropertyGroup> | ||
| 11 | |||
| 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
| 13 | <PlatformName>$(Platform)</PlatformName> | ||
| 14 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 15 | <DefineConstants>Debug</DefineConstants> | ||
| 16 | </PropertyGroup> | ||
| 17 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
| 18 | <PlatformName>$(Platform)</PlatformName> | ||
| 19 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 20 | </PropertyGroup> | ||
| 21 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
| 22 | <PlatformName>$(Platform)</PlatformName> | ||
| 23 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 24 | <DefineConstants>Debug</DefineConstants> | ||
| 25 | </PropertyGroup> | ||
| 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
| 27 | <PlatformName>$(Platform)</PlatformName> | ||
| 28 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 29 | </PropertyGroup> | ||
| 30 | |||
| 31 | <ItemGroup> | ||
| 32 | <Compile Include="Package.wxs" /> | ||
| 33 | </ItemGroup> | ||
| 34 | |||
| 35 | <ItemGroup> | ||
| 36 | <BindInputPaths Include="." /> | ||
| 37 | </ItemGroup> | ||
| 38 | |||
| 39 | <PropertyGroup> | ||
| 40 | <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds> | ||
| 41 | </PropertyGroup> | ||
| 42 | |||
| 43 | <ItemGroup> | ||
| 44 | <HarvestFile Include="HeatFilePackage.wixproj"> | ||
| 45 | <ComponentGroupName>ProductComponents</ComponentGroupName> | ||
| 46 | <DirectoryRefId>INSTALLFOLDER</DirectoryRefId> | ||
| 47 | <SuppressRootDirectory>true</SuppressRootDirectory> | ||
| 48 | </HarvestFile> | ||
| 49 | </ItemGroup> | ||
| 50 | |||
| 51 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 52 | <Import Project="$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets') " /> | ||
| 53 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 54 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 55 | </Target> | ||
| 56 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/Package.wxs b/src/test/WixToolsetTest.MSBuild/TestData/HeatFilePackage/Package.wxs new file mode 100644 index 00000000..e509c464 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj new file mode 100644 index 00000000..e04ea43d --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/MsiPackage.wixproj | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | <ProductVersion>0.9</ProductVersion> | ||
| 7 | <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid> | ||
| 8 | <OutputName>MsiPackage</OutputName> | ||
| 9 | <OutputType>Package</OutputType> | ||
| 10 | <Name>MsiPackage</Name> | ||
| 11 | <RootNamespace>MsiPackage</RootNamespace> | ||
| 12 | <Cultures>en-US,en;de-DE</Cultures> | ||
| 13 | </PropertyGroup> | ||
| 14 | |||
| 15 | <PropertyGroup> | ||
| 16 | <WixTargetsPath>..\..\..\..\..\..\build\Release\publish\net461\wix.targets</WixTargetsPath> | ||
| 17 | </PropertyGroup> | ||
| 18 | |||
| 19 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
| 20 | <PlatformName>$(Platform)</PlatformName> | ||
| 21 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 22 | <DefineConstants>Debug</DefineConstants> | ||
| 23 | </PropertyGroup> | ||
| 24 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
| 25 | <PlatformName>$(Platform)</PlatformName> | ||
| 26 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 27 | </PropertyGroup> | ||
| 28 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
| 29 | <PlatformName>$(Platform)</PlatformName> | ||
| 30 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 31 | <DefineConstants>Debug</DefineConstants> | ||
| 32 | </PropertyGroup> | ||
| 33 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
| 34 | <PlatformName>$(Platform)</PlatformName> | ||
| 35 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 36 | </PropertyGroup> | ||
| 37 | |||
| 38 | <ItemGroup> | ||
| 39 | <Compile Include="Package.wxs" /> | ||
| 40 | <Compile Include="PackageComponents.wxs" /> | ||
| 41 | </ItemGroup> | ||
| 42 | |||
| 43 | <ItemGroup> | ||
| 44 | <EmbeddedResource Include="Package.en-us.wxl" /> | ||
| 45 | <EmbeddedResource Include="Package.de-de.wxl" /> | ||
| 46 | </ItemGroup> | ||
| 47 | |||
| 48 | <ItemGroup> | ||
| 49 | <BindInputPaths Include="data" /> | ||
| 50 | </ItemGroup> | ||
| 51 | |||
| 52 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 53 | <Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\wix.targets') " /> | ||
| 54 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 55 | <Error Text="WiX Toolset build tools (v3.11 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 56 | </Target> | ||
| 57 | </Project> | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl new file mode 100644 index 00000000..23493ace --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.de-de.wxl | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This 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.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.en-us.wxl | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This 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.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/Package.wxs new file mode 100644 index 00000000..d5a5a40d --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/PackageComponents.wxs new file mode 100644 index 00000000..e26c4509 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MsiPackage/data/test.txt new file mode 100644 index 00000000..cd0db0e1 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln new file mode 100644 index 00000000..2c88704e --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/MultiCulturalMsiPackage/MultiCulturalMsiPackage.sln | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | | ||
| 2 | Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| 3 | # Visual Studio 15 | ||
| 4 | VisualStudioVersion = 15.0.26730.8 | ||
| 5 | MinimumVisualStudioVersion = 10.0.40219.1 | ||
| 6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}" | ||
| 7 | EndProject | ||
| 8 | Global | ||
| 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 | ||
| 31 | EndGlobal | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj new file mode 100644 index 00000000..d5cac8d8 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/MsiPackage.wixproj | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | </PropertyGroup> | ||
| 7 | |||
| 8 | <PropertyGroup> | ||
| 9 | <ProjectGuid>7fb77005-c6e0-454f-8c2d-0a4a79c918ba</ProjectGuid> | ||
| 10 | </PropertyGroup> | ||
| 11 | |||
| 12 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> | ||
| 13 | <PlatformName>$(Platform)</PlatformName> | ||
| 14 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 15 | <DefineConstants>Debug</DefineConstants> | ||
| 16 | </PropertyGroup> | ||
| 17 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> | ||
| 18 | <PlatformName>$(Platform)</PlatformName> | ||
| 19 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 20 | </PropertyGroup> | ||
| 21 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> | ||
| 22 | <PlatformName>$(Platform)</PlatformName> | ||
| 23 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 24 | <DefineConstants>Debug</DefineConstants> | ||
| 25 | </PropertyGroup> | ||
| 26 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> | ||
| 27 | <PlatformName>$(Platform)</PlatformName> | ||
| 28 | <OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath> | ||
| 29 | </PropertyGroup> | ||
| 30 | |||
| 31 | <ItemGroup> | ||
| 32 | <Compile Include="Package.wxs" /> | ||
| 33 | <Compile Include="PackageComponents.wxs" /> | ||
| 34 | </ItemGroup> | ||
| 35 | |||
| 36 | <ItemGroup> | ||
| 37 | <EmbeddedResource Include="Package.en-us.wxl" /> | ||
| 38 | </ItemGroup> | ||
| 39 | |||
| 40 | <ItemGroup> | ||
| 41 | <BindInputPaths Include="data" /> | ||
| 42 | </ItemGroup> | ||
| 43 | |||
| 44 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 45 | <Import Project="$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets') " /> | ||
| 46 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 47 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 48 | </Target> | ||
| 49 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/Package.en-us.wxl | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | |||
| 3 | <!-- | ||
| 4 | This 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.MSBuild/TestData/SimpleMsiPackage/MsiPackage/Package.wxs b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/Package.wxs new file mode 100644 index 00000000..f7998fff --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/PackageComponents.wxs new file mode 100644 index 00000000..ddb95faf --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/SimpleMsiPackage/MsiPackage/data/test.txt b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/MsiPackage/data/test.txt new file mode 100644 index 00000000..cd0db0e1 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/Bundle.wxs new file mode 100644 index 00000000..6cd04712 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/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.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj new file mode 100644 index 00000000..4c837936 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleBundle/SimpleBundle.wixproj | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| 5 | <Platform Condition=" '$(Platform)' == '' ">x86</Platform> | ||
| 6 | </PropertyGroup> | ||
| 7 | |||
| 8 | <PropertyGroup> | ||
| 9 | <ProjectGuid>6670d5c9-bbec-4828-ab60-4a1c0ffeb97d</ProjectGuid> | ||
| 10 | <OutputType>Bundle</OutputType> | ||
| 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="Bundle.wxs" /> | ||
| 34 | </ItemGroup> | ||
| 35 | |||
| 36 | <ItemGroup> | ||
| 37 | <BindInputPaths Include="..\MsiPackage\data" /> | ||
| 38 | </ItemGroup> | ||
| 39 | |||
| 40 | <Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " /> | ||
| 41 | <Import Project="$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\WixToolset\v4.x\wix.targets') " /> | ||
| 42 | <Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' "> | ||
| 43 | <Error Text="WiX Toolset build tools (v4.0 or later) must be installed to build this project. To download the WiX Toolset, go to http://wixtoolset.org/releases/." /> | ||
| 44 | </Target> | ||
| 45 | </Project> \ No newline at end of file | ||
diff --git a/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleMsiPackage.sln b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleMsiPackage.sln new file mode 100644 index 00000000..dd21489d --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/TestData/SimpleMsiPackage/SimpleMsiPackage.sln | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | | ||
| 2 | Microsoft Visual Studio Solution File, Format Version 12.00 | ||
| 3 | # Visual Studio Version 16 | ||
| 4 | VisualStudioVersion = 16.0.30011.22 | ||
| 5 | MinimumVisualStudioVersion = 10.0.40219.1 | ||
| 6 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "MsiPackage", "MsiPackage\MsiPackage.wixproj", "{7FB77005-C6E0-454F-8C2D-0A4A79C918BA}" | ||
| 7 | EndProject | ||
| 8 | Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "SimpleBundle", "SimpleBundle\SimpleBundle.wixproj", "{6670D5C9-BBEC-4828-AB60-4A1C0FFEB97D}" | ||
| 9 | EndProject | ||
| 10 | Global | ||
| 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 | ||
| 39 | EndGlobal | ||
diff --git a/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.csproj b/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.csproj new file mode 100644 index 00000000..bb109557 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.csproj | |||
| @@ -0,0 +1,43 @@ | |||
| 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\MultiCulturalMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" /> | ||
| 19 | <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.de-de.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 20 | <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 21 | <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 22 | <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 23 | <Content Include="TestData\MultiCulturalMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
| 24 | <Content Include="TestData\SimpleMsiPackage\MsiPackage\MsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" /> | ||
| 25 | <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.en-us.wxl" CopyToOutputDirectory="PreserveNewest" /> | ||
| 26 | <Content Include="TestData\SimpleMsiPackage\MsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 27 | <Content Include="TestData\SimpleMsiPackage\MsiPackage\PackageComponents.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 28 | <Content Include="TestData\SimpleMsiPackage\MsiPackage\data\test.txt" CopyToOutputDirectory="PreserveNewest" /> | ||
| 29 | <Content Include="TestData\SimpleMsiPackage\SimpleBundle\Bundle.wxs" CopyToOutputDirectory="PreserveNewest" /> | ||
| 30 | <Content Include="TestData\SimpleMsiPackage\SimpleBundle\SimpleBundle.wixproj" CopyToOutputDirectory="PreserveNewest" /> | ||
| 31 | </ItemGroup> | ||
| 32 | |||
| 33 | <ItemGroup> | ||
| 34 | <PackageReference Include="WixBuildTools.TestSupport" Version="4.0.*" /> | ||
| 35 | <PackageReference Include="WixToolset.Core.TestPackage" Version="4.0.*" /> | ||
| 36 | </ItemGroup> | ||
| 37 | |||
| 38 | <ItemGroup> | ||
| 39 | <PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.3.0" /> | ||
| 40 | <PackageReference Include="xunit" Version="2.4.1" /> | ||
| 41 | <PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" PrivateAssets="All" /> | ||
| 42 | </ItemGroup> | ||
| 43 | </Project> | ||
diff --git a/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.v3.ncrunchproject b/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.v3.ncrunchproject new file mode 100644 index 00000000..cf22dfa9 --- /dev/null +++ b/src/test/WixToolsetTest.MSBuild/WixToolsetTest.MSBuild.v3.ncrunchproject | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | <ProjectConfiguration> | ||
| 2 | <Settings> | ||
| 3 | <HiddenComponentWarnings /> | ||
| 4 | </Settings> | ||
| 5 | </ProjectConfiguration> \ No newline at end of file | ||
