@joebigelow / wix-1 / commits / b0cb6432

WIXFEAT:5490 - Send MSBuild bin path to heat project harvesting.

Sean Hall committed Nov 7, 2020 at 11:30 UTC b0cb6432808a687bf18b19e0018bb4287093d02b
12 files changed +447
src/WixToolset.BuildTasks/HeatProject.cs
+9
@@ -39,6 +39,8 @@ namespace WixToolset.BuildTasks
39 set { this.generateType = value; }
40 }
41
42 + public string MsbuildBinPath { get; set; }
43 +
44 public string Platform
45 {
46 get { return this.platform; }
@@ -77,6 +79,8 @@ namespace WixToolset.BuildTasks
79 }
80 }
81
82 + public bool UseToolsVersion { get; set; }
83 +
84 protected override string OperationName
85 {
86 get { return "project"; }
@@ -90,11 +94,16 @@ namespace WixToolset.BuildTasks
94 commandLineBuilder.AppendSwitchIfNotNull("-configuration ", this.Configuration);
95 commandLineBuilder.AppendSwitchIfNotNull("-directoryid ", this.DirectoryIds);
96 commandLineBuilder.AppendSwitchIfNotNull("-generate ", this.GenerateType);
97 + commandLineBuilder.AppendSwitchIfNotNull("-msbuildbinpath ", this.MsbuildBinPath);
98 commandLineBuilder.AppendSwitchIfNotNull("-platform ", this.Platform);
99 commandLineBuilder.AppendArrayIfNotNull("-pog ", this.ProjectOutputGroups);
100 commandLineBuilder.AppendSwitchIfNotNull("-projectname ", this.ProjectName);
101 commandLineBuilder.AppendIfTrue("-wixvar", this.GenerateWixVariables);
102
103 +#if !NETCOREAPP
104 + commandLineBuilder.AppendIfTrue("-usetoolsversion", this.UseToolsVersion);
105 +#endif
106 +
107 base.BuildCommandLine(commandLineBuilder);
108 }
109 }
src/WixToolset.Sdk/tools/wix.harvest.targets
+3
@@ -48,6 +48,7 @@
48 <HarvestProjectsTransforms Condition=" '$(HarvestProjectsTransforms)' == '' ">$(HarvestTransforms)</HarvestProjectsTransforms>
49 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' != 'Bundle' ">$(IntermediateOutputPath)Product.Generated.wxs</HarvestProjectsGeneratedFile>
50 <HarvestProjectsGeneratedFile Condition=" '$(HarvestProjectsGeneratedFile)' == '' and '$(OutputType)' == 'Bundle' ">$(IntermediateOutputPath)Bundle.Generated.wxs</HarvestProjectsGeneratedFile>
51 + <HarvestProjectsMsbuildBinPath Condition=" '$(HarvestProjectsMsbuildBinPath)' == '' ">$(MSBuildBinPath)</HarvestProjectsMsbuildBinPath>
52 </PropertyGroup>
53
54 <!-- Default HarvestDirectory properties -->
@@ -273,11 +274,13 @@
274 Project="%(_AllHeatProjects.FullPath)"
275 ProjectOutputGroups="%(_AllHeatProjects.ProjectOutputGroups)"
276 GenerateType="%(_AllHeatProjects.GenerateType)"
277 + MsbuildBinPath="$(HarvestProjectsMsbuildBinPath)"
278 DirectoryIds="%(_AllHeatProjects.DirectoryIds)"
279 ProjectName="%(_AllHeatProjects.ProjectName)"
280 Configuration="%(_AllHeatProjects.Configuration)"
281 Platform="%(_AllHeatProjects.Platform)"
282 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
283 + UseToolsVersion="$(HarvestProjectsUseToolsVersion)"
284 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
285 RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
286 ToolExe="$(HeatToolExe)"
src/test/WixToolsetTest.Sdk/MsbuildHeatFixture.cs
+225
@@ -146,5 +146,230 @@ namespace WixToolsetTest.Sdk
146 Assert.Equal(@"SourceDir\MyProgram.json", fileSymbols[1][FileSymbolFields.Source].PreviousValue.AsPath().Path);
147 }
148 }
149 +
150 + [Theory]
151 + [InlineData(BuildSystem.DotNetCoreSdk, true)]
152 + [InlineData(BuildSystem.DotNetCoreSdk, false)]
153 + [InlineData(BuildSystem.MSBuild, true)]
154 + [InlineData(BuildSystem.MSBuild, false)]
155 + [InlineData(BuildSystem.MSBuild64, true)]
156 + [InlineData(BuildSystem.MSBuild64, false)]
157 + public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
158 + {
159 + var sourceFolder = TestData.Get(@"TestData\HeatProject");
160 +
161 + using (var fs = new TestDataFolderFileSystem())
162 + {
163 + fs.Initialize(sourceFolder);
164 + var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle");
165 + var binFolder = Path.Combine(baseFolder, @"bin\");
166 + var intermediateFolder = Path.Combine(baseFolder, @"obj\");
167 + var projectPath = Path.Combine(baseFolder, "HeatProjectPreSdkStyle.wixproj");
168 +
169 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
170 + {
171 + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
172 + });
173 + result.AssertSuccess();
174 +
175 + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
176 + var heatCommandLine = Assert.Single(heatCommandLines);
177 +
178 + if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
179 + {
180 + Assert.Contains("-usetoolsversion", heatCommandLine);
181 + }
182 + else
183 + {
184 + Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
185 + }
186 +
187 + var warnings = result.Output.Where(line => line.Contains(": warning"));
188 + Assert.Empty(warnings);
189 +
190 + var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ToolsVersion4Cs.wxs");
191 + Assert.True(File.Exists(generatedFilePath));
192 +
193 + var generatedContents = File.ReadAllText(generatedFilePath);
194 + var testXml = generatedContents.GetTestXml();
195 + Assert.Equal(@"<Wix>" +
196 + "<Fragment>" +
197 + "<DirectoryRef Id='ToolsVersion4Cs.Binaries'>" +
198 + "<Component Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Guid='*'>" +
199 + "<File Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.dll' />" +
200 + "</Component>" +
201 + "</DirectoryRef>" +
202 + "</Fragment>" +
203 + "<Fragment>" +
204 + "<ComponentGroup Id='ToolsVersion4Cs.Binaries'>" +
205 + "<ComponentRef Id='ToolsVersion4Cs.Binaries.ToolsVersion4Cs.dll' />" +
206 + "</ComponentGroup>" +
207 + "</Fragment>" +
208 + "<Fragment>" +
209 + "<DirectoryRef Id='ToolsVersion4Cs.Symbols'>" +
210 + "<Component Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Guid='*'>" +
211 + "<File Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' Source='$(var.ToolsVersion4Cs.TargetDir)\\ToolsVersion4Cs.pdb' />" +
212 + "</Component>" +
213 + "</DirectoryRef>" +
214 + "</Fragment>" +
215 + "<Fragment>" +
216 + "<ComponentGroup Id='ToolsVersion4Cs.Symbols'>" +
217 + "<ComponentRef Id='ToolsVersion4Cs.Symbols.ToolsVersion4Cs.pdb' />" +
218 + "</ComponentGroup>" +
219 + "</Fragment>" +
220 + "<Fragment>" +
221 + "<DirectoryRef Id='ToolsVersion4Cs.Sources'>" +
222 + "<Component Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Guid='*'>" +
223 + "<File Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' Source='$(var.ToolsVersion4Cs.ProjectDir)\\ToolsVersion4Cs.csproj' />" +
224 + "</Component>" +
225 + "<Directory Id='ToolsVersion4Cs.Sources.Properties' Name='Properties'>" +
226 + "<Component Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Guid='*'>" +
227 + "<File Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' Source='$(var.ToolsVersion4Cs.ProjectDir)\\Properties\\AssemblyInfo.cs' />" +
228 + "</Component>" +
229 + "</Directory>" +
230 + "</DirectoryRef>" +
231 + "</Fragment>" +
232 + "<Fragment>" +
233 + "<ComponentGroup Id='ToolsVersion4Cs.Sources'>" +
234 + "<ComponentRef Id='ToolsVersion4Cs.Sources.ToolsVersion4Cs.csproj' />" +
235 + "<ComponentRef Id='ToolsVersion4Cs.Sources.AssemblyInfo.cs' />" +
236 + "</ComponentGroup>" +
237 + "</Fragment>" +
238 + "<Fragment>" +
239 + "<ComponentGroup Id='ToolsVersion4Cs.Content' />" +
240 + "</Fragment>" +
241 + "<Fragment>" +
242 + "<ComponentGroup Id='ToolsVersion4Cs.Satellites' />" +
243 + "</Fragment>" +
244 + "<Fragment>" +
245 + "<ComponentGroup Id='ToolsVersion4Cs.Documents' />" +
246 + "</Fragment>" +
247 + "</Wix>", testXml);
248 +
249 + var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectPreSdkStyle.wixpdb");
250 + Assert.True(File.Exists(pdbPath));
251 +
252 + var intermediate = Intermediate.Load(pdbPath);
253 + var section = intermediate.Sections.Single();
254 +
255 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
256 + Assert.Equal(Path.Combine(fs.BaseFolder, "ToolsVersion4Cs", "bin", "Release\\\\ToolsVersion4Cs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
257 + }
258 + }
259 +
260 + [Theory]
261 + [InlineData(BuildSystem.DotNetCoreSdk, true)]
262 + [InlineData(BuildSystem.DotNetCoreSdk, false)]
263 + [InlineData(BuildSystem.MSBuild, true)]
264 + [InlineData(BuildSystem.MSBuild, false)]
265 + [InlineData(BuildSystem.MSBuild64, true)]
266 + [InlineData(BuildSystem.MSBuild64, false)]
267 + public void CanBuildHeatProjectSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
268 + {
269 + var sourceFolder = TestData.Get(@"TestData\HeatProject");
270 +
271 + using (var fs = new TestDataFolderFileSystem())
272 + {
273 + fs.Initialize(sourceFolder);
274 + var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle");
275 + var binFolder = Path.Combine(baseFolder, @"bin\");
276 + var intermediateFolder = Path.Combine(baseFolder, @"obj\");
277 + var projectPath = Path.Combine(baseFolder, "HeatProjectSdkStyle.wixproj");
278 + var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj");
279 +
280 + var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[]
281 + {
282 + "-t:restore",
283 + });
284 + result.AssertSuccess();
285 +
286 + result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
287 + {
288 + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
289 + });
290 + result.AssertSuccess();
291 +
292 + var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
293 + var heatCommandLine = Assert.Single(heatCommandLines);
294 +
295 + if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk)
296 + {
297 + Assert.Contains("-usetoolsversion", heatCommandLine);
298 + }
299 + else
300 + {
301 + Assert.DoesNotContain("-usetoolsversion", heatCommandLine);
302 + }
303 +
304 + var warnings = result.Output.Where(line => line.Contains(": warning"));
305 + Assert.Empty(warnings);
306 +
307 + var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_SdkStyleCs.wxs");
308 + Assert.True(File.Exists(generatedFilePath));
309 +
310 + var generatedContents = File.ReadAllText(generatedFilePath);
311 + var testXml = generatedContents.GetTestXml();
312 + Assert.Equal(@"<Wix>" +
313 + "<Fragment>" +
314 + "<DirectoryRef Id='SdkStyleCs.Binaries'>" +
315 + "<Component Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Guid='*'>" +
316 + "<File Id='SdkStyleCs.Binaries.SdkStyleCs.dll' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.dll' />" +
317 + "</Component>" +
318 + "</DirectoryRef>" +
319 + "</Fragment>" +
320 + "<Fragment>" +
321 + "<ComponentGroup Id='SdkStyleCs.Binaries'>" +
322 + "<ComponentRef Id='SdkStyleCs.Binaries.SdkStyleCs.dll' />" +
323 + "</ComponentGroup>" +
324 + "</Fragment>" +
325 + "<Fragment>" +
326 + "<DirectoryRef Id='SdkStyleCs.Symbols'>" +
327 + "<Component Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Guid='*'>" +
328 + "<File Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' Source='$(var.SdkStyleCs.TargetDir)\\SdkStyleCs.pdb' />" +
329 + "</Component>" +
330 + "</DirectoryRef>" +
331 + "</Fragment>" +
332 + "<Fragment>" +
333 + "<ComponentGroup Id='SdkStyleCs.Symbols'>" +
334 + "<ComponentRef Id='SdkStyleCs.Symbols.SdkStyleCs.pdb' />" +
335 + "</ComponentGroup>" +
336 + "</Fragment>" +
337 + "<Fragment>" +
338 + "<DirectoryRef Id='SdkStyleCs.Sources'>" +
339 + "<Component Id='SdkStyleCs.Sources.SdkStyleCs.cs' Guid='*'>" +
340 + "<File Id='SdkStyleCs.Sources.SdkStyleCs.cs' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.cs' />" +
341 + "</Component>" +
342 + "<Component Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Guid='*'>" +
343 + "<File Id='SdkStyleCs.Sources.SdkStyleCs.csproj' Source='$(var.SdkStyleCs.ProjectDir)\\SdkStyleCs.csproj' />" +
344 + "</Component>" +
345 + "</DirectoryRef>" +
346 + "</Fragment>" +
347 + "<Fragment>" +
348 + "<ComponentGroup Id='SdkStyleCs.Sources'>" +
349 + "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.cs' />" +
350 + "<ComponentRef Id='SdkStyleCs.Sources.SdkStyleCs.csproj' />" +
351 + "</ComponentGroup>" +
352 + "</Fragment>" +
353 + "<Fragment>" +
354 + "<ComponentGroup Id='SdkStyleCs.Content' />" +
355 + "</Fragment>" +
356 + "<Fragment>" +
357 + "<ComponentGroup Id='SdkStyleCs.Satellites' />" +
358 + "</Fragment>" +
359 + "<Fragment>" +
360 + "<ComponentGroup Id='SdkStyleCs.Documents' />" +
361 + "</Fragment>" +
362 + "</Wix>", testXml);
363 +
364 + var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectSdkStyle.wixpdb");
365 + Assert.True(File.Exists(pdbPath));
366 +
367 + var intermediate = Intermediate.Load(pdbPath);
368 + var section = intermediate.Sections.Single();
369 +
370 + var fileSymbol = section.Symbols.OfType<FileSymbol>().Single();
371 + Assert.Equal(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].PreviousValue.AsPath().Path);
372 + }
373 + }
374 }
375 }
src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj new
+50
@@ -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 + </PropertyGroup>
8 +
9 + <PropertyGroup>
10 + <ProjectGuid>BB919765-DD69-41E7-91C5-415A69BE923E</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 + <EnableProjectHarvesting>true</EnableProjectHarvesting>
42 + <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
43 + </PropertyGroup>
44 +
45 + <ItemGroup>
46 + <ProjectReference Include="..\ToolsVersion4Cs\ToolsVersion4Cs.csproj" />
47 + </ItemGroup>
48 +
49 + <Import Project="$(WixTargetsPath)" />
50 +</Project>
\ No newline at end of file
src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs new
+19
@@ -0,0 +1,19 @@
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 + <Package Name="HeatProjectPreSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5622BB42-89F6-4810-A2A3-98AFF28282FE" Compressed="yes" InstallerVersion="200">
3 +
4 +
5 + <MediaTemplate />
6 +
7 + <Feature Id="ProductFeature" Title="HeatProjectFeature">
8 + <ComponentGroupRef Id="ToolsVersion4Cs.Binaries" />
9 + </Feature>
10 + </Package>
11 +
12 + <Fragment>
13 + <Directory Id="TARGETDIR" Name="SourceDir">
14 + <Directory Id="ProgramFilesFolder">
15 + <Directory Id="ToolsVersion4Cs.Binaries" Name="MsiPackage" />
16 + </Directory>
17 + </Directory>
18 + </Fragment>
19 +</Wix>
src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj new
+50
@@ -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 + </PropertyGroup>
8 +
9 + <PropertyGroup>
10 + <ProjectGuid>CE998A54-9BEC-4268-BFA2-8E3DAE5831C8</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 + <EnableProjectHarvesting>true</EnableProjectHarvesting>
42 + <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
43 + </PropertyGroup>
44 +
45 + <ItemGroup>
46 + <ProjectReference Include="..\SdkStyleCs\SdkStyleCs.csproj" />
47 + </ItemGroup>
48 +
49 + <Import Project="$(WixTargetsPath)" />
50 +</Project>
\ No newline at end of file
src/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs new
+19
@@ -0,0 +1,19 @@
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 + <Package Name="HeatProjectSdkStyle" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="D2AF3276-A68E-40DE-85A1-4BCD5B35D432" Compressed="yes" InstallerVersion="200">
3 +
4 +
5 + <MediaTemplate />
6 +
7 + <Feature Id="ProductFeature" Title="HeatProjectFeature">
8 + <ComponentGroupRef Id="SdkStyleCs.Binaries" />
9 + </Feature>
10 + </Package>
11 +
12 + <Fragment>
13 + <Directory Id="TARGETDIR" Name="SourceDir">
14 + <Directory Id="ProgramFilesFolder">
15 + <Directory Id="SdkStyleCs.Binaries" Name="MsiPackage" />
16 + </Directory>
17 + </Directory>
18 + </Fragment>
19 +</Wix>
src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs new
+8
@@ -0,0 +1,8 @@
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 SdkStyleCs
4 +{
5 + public class SdkStyleCs
6 + {
7 + }
8 +}
src/test/WixToolsetTest.Sdk/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj new
+8
@@ -0,0 +1,8 @@
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>netstandard2.0</TargetFramework>
7 + </PropertyGroup>
8 +</Project>
src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs new
+11
@@ -0,0 +1,11 @@
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 +using System;
4 +using System.Reflection;
5 +using System.Runtime.InteropServices;
6 +
7 +[assembly: AssemblyTitle("ToolsVersion4Cs")]
8 +[assembly: AssemblyDescription("ToolsVersion4Cs")]
9 +[assembly: AssemblyProduct("WiX Toolset")]
10 +[assembly: AssemblyCompany("WiX Toolset Team")]
11 +[assembly: AssemblyCopyright("Copyright (c) .NET Foundation and contributors. All rights reserved.")]
src/test/WixToolsetTest.Sdk/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj new
+36
@@ -0,0 +1,36 @@
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 +
5 +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 + <PropertyGroup>
7 + <ProjectGuid>{8B19578A-816A-48A1-A6C4-58067334EB79}</ProjectGuid>
8 + <AssemblyName>ToolsVersion4Cs</AssemblyName>
9 + <OutputType>Library</OutputType>
10 + <RootNamespace>ToolsVersion4Cs</RootNamespace>
11 + <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
12 + </PropertyGroup>
13 + <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
14 + <DebugSymbols>true</DebugSymbols>
15 + <Optimize>false</Optimize>
16 + <DefineConstants>$(DefineConstants);DEBUG;TRACE</DefineConstants>
17 + <OutputPath>bin\Debug\</OutputPath>
18 + </PropertyGroup>
19 + <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
20 + <DebugSymbols>true</DebugSymbols>
21 + <Optimize>true</Optimize>
22 + <DefineConstants>$(DefineConstants);TRACE</DefineConstants>
23 + <OutputPath>bin\Release\</OutputPath>
24 + </PropertyGroup>
25 + <ItemGroup>
26 + <Compile Include="Properties\AssemblyInfo.cs" />
27 + </ItemGroup>
28 + <ItemGroup>
29 + <Reference Include="System" />
30 + <Reference Include="System.Configuration" />
31 + <Reference Include="System.Data" />
32 + <Reference Include="System.Xml" />
33 + </ItemGroup>
34 +
35 + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
36 +</Project>
\ No newline at end of file
src/test/WixToolsetTest.Sdk/WixToolsetTest.Sdk.csproj
+9
@@ -6,6 +6,7 @@
6 <TargetFramework>net461</TargetFramework>
7 <IsPackable>false</IsPackable>
8 <DebugType>embedded</DebugType>
9 + <DefaultItemExcludes>TestData\**;$(DefaultItemExcludes)</DefaultItemExcludes>
10 </PropertyGroup>
11
12 <ItemGroup>
@@ -15,6 +16,14 @@
16 <Content Include="TestData\HeatFileMultipleFilesSameFileName\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.txt" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="TestData\HeatFileMultipleFilesSameFileName\MyProgram.json" CopyToOutputDirectory="PreserveNewest" />
19 + <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\HeatProjectPreSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" />
20 + <Content Include="TestData\HeatProject\HeatProjectPreSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
21 + <Content Include="TestData\HeatProject\HeatProjectSdkStyle\HeatProjectSdkStyle.wixproj" CopyToOutputDirectory="PreserveNewest" />
22 + <Content Include="TestData\HeatProject\HeatProjectSdkStyle\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
23 + <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.cs" CopyToOutputDirectory="PreserveNewest" />
24 + <Content Include="TestData\HeatProject\SdkStyleCs\SdkStyleCs.csproj" CopyToOutputDirectory="PreserveNewest" />
25 + <Content Include="TestData\HeatProject\ToolsVersion4Cs\Properties\AssemblyInfo.cs" CopyToOutputDirectory="PreserveNewest" />
26 + <Content Include="TestData\HeatProject\ToolsVersion4Cs\ToolsVersion4Cs.csproj" CopyToOutputDirectory="PreserveNewest" />
27 <Content Include="TestData\MergeModule\MergeMsiPackage\MergeMsiPackage.wixproj" CopyToOutputDirectory="PreserveNewest" />
28 <Content Include="TestData\MergeModule\MergeMsiPackage\Package.wxs" CopyToOutputDirectory="PreserveNewest" />
29 <Content Include="TestData\MergeModule\SimpleMergeModule\data\MergeModule.txt" CopyToOutputDirectory="PreserveNewest" />