@joebigelow / wix / commits / a627ca9b

Create WixToolset.Heat.nupkg to distribute heat.exe and Heat targets

Moves Heat functionality to the "tools" layer and packages it all up in WixToolset.Heat.nupkg for distribution in WiX v4. Completes 6838

Rob Mensching committed Jul 26, 2022 at 17:20 UTC a627ca9b720047e633a8fe72003ab9bee31006c5
124 files changed +991 -777
src/build_all.cmd
+4 -4
@@ -44,14 +44,14 @@ call burn\burn.cmd %_C% || exit /b
44 call wix\wix.cmd %_C% || exit /b
45
46
47 -:: ext
47 +:: tools
48
49 -call ext\ext.cmd %_C% || exit /b
49 +call tools\tools.cmd %_C% || exit /b
50
51
52 -:: tools
52 +:: ext
53
54 -call tools\tools.cmd %_C% || exit /b
54 +call ext\ext.cmd %_C% || exit /b
55
56
57 :: integration tests
src/clean.cmd
+1
@@ -39,6 +39,7 @@ if exist "%_NUGET_CACHE%\wixtoolset.dtf.resources" rd /s/q "%_NUGET_CACHE%\wixto
39 if exist "%_NUGET_CACHE%\wixtoolset.dtf.windowsinstaller" rd /s/q "%_NUGET_CACHE%\wixtoolset.dtf.windowsinstaller"
40 if exist "%_NUGET_CACHE%\wixtoolset.dutil" rd /s/q "%_NUGET_CACHE%\wixtoolset.dutil"
41 if exist "%_NUGET_CACHE%\wixtoolset.extensibility" rd /s/q "%_NUGET_CACHE%\wixtoolset.extensibility"
42 +if exist "%_NUGET_CACHE%\wixtoolset.heat" rd /s/q "%_NUGET_CACHE%\wixtoolset.heat"
43 if exist "%_NUGET_CACHE%\wixtoolset.mba.core" rd /s/q "%_NUGET_CACHE%\wixtoolset.mba.core"
44 if exist "%_NUGET_CACHE%\wixtoolset.netfx.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.netfx.wixext"
45 if exist "%_NUGET_CACHE%\wixtoolset.sdk" rd /s/q "%_NUGET_CACHE%\wixtoolset.sdk"
src/ext/Bal/bal.cmd
+1 -1
@@ -22,7 +22,7 @@ msbuild -p:Configuration=%_C% || exit /b
22
23 dotnet test test\WixToolsetTest.Dnc.HostGenerator -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Dnc.HostGenerator.trx" || exit /b
24
25 -msbuild -p:Configuration=%_C% test\examples\examples.proj || exit /b
25 +msbuild -Restore -p:Configuration=%_C% test\examples\examples.proj -bl || exit /b
26
27 :: Test
28 dotnet test test\WixToolsetTest.Bal -c %_C% --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Bal.trx" || exit /b
src/ext/Bal/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj
+4
@@ -7,4 +7,8 @@
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10 +
11 + <ItemGroup>
12 + <PackageReference Include="WixToolset.Heat" />
13 + </ItemGroup>
14 </Project>
src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj
+4
@@ -7,4 +7,8 @@
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10 +
11 + <ItemGroup>
12 + <PackageReference Include="WixToolset.Heat" />
13 + </ItemGroup>
14 </Project>
src/ext/Bal/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj
+4
@@ -7,4 +7,8 @@
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10 +
11 + <ItemGroup>
12 + <PackageReference Include="WixToolset.Heat" />
13 + </ItemGroup>
14 </Project>
src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj
+4
@@ -7,4 +7,8 @@
7 <Transforms>ba.xslt</Transforms>
8 </HarvestDirectory>
9 </ItemGroup>
10 +
11 + <ItemGroup>
12 + <PackageReference Include="WixToolset.Heat" />
13 + </ItemGroup>
14 </Project>
src/ext/Bal/test/examples/examples.proj
+7 -12
@@ -2,8 +2,7 @@
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 - <Import Project="..\..\Directory.Build.props" />
5 +<Project Sdk="Microsoft.Build.Traversal">
6
7 <PropertyGroup>
8 <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath>
@@ -28,14 +27,12 @@
27 <SkipFDDx86>true</SkipFDDx86>
28 <SkipSCD>true</SkipSCD>
29 </CoreMBAProject>
31 -
30 +
31 <FullMBAProject Include="$(FullFramework2MBAProjectPath)" />
32 <FullMBAProject Include="$(FullFramework4MBAProjectPath)" />
34 -
35 - <ExampleBundleProject Include="**\*.wixproj" />
33 </ItemGroup>
34
38 - <Target Name="PublishCoreExamples">
35 + <Target Name="PublishCoreExamples" BeforeTargets="Build">
36 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd-x86" -r win-x86 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
37 Condition="'%(CoreMBAProject.SkipFDDx86)'==''" />
38 <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\fdd" -r win-x64 -c $(Configuration) --self-contained false "%(CoreMBAProject.Identity)"'
@@ -46,9 +43,7 @@
43 Condition="'%(CoreMBAProject.TrimMode)'!=''" />
44 </Target>
45
49 - <Target Name="Build" DependsOnTargets="PublishCoreExamples">
50 - <MSBuild Projects="%(ExampleBundleProject.Identity)" />
51 - </Target>
52 -
53 - <Import Project="..\..\..\..\Directory.Build.targets" />
54 -</Project>
\ No newline at end of file
46 + <ItemGroup>
47 + <ProjectReference Include="**\*.wixproj" />
48 + </ItemGroup>
49 +</Project>
src/internal/SetBuildNumber/Directory.Packages.props.pp
+2
@@ -28,6 +28,8 @@
28 <PackageVersion Include="WixToolset.Core.WindowsInstaller" Version="{packageversion}" />
29 <PackageVersion Include="WixToolset.Core.TestPackage" Version="{packageversion}" />
30
31 + <PackageVersion Include="WixToolset.Heat" Version="{packageversion}" />
32 +
33 <PackageVersion Include="WixToolset.Bal.wixext" Version="{packageversion}" />
34 <PackageVersion Include="WixToolset.Dependency.wixext" Version="{packageversion}" />
35 <PackageVersion Include="WixToolset.NetFx.wixext" Version="{packageversion}" />
src/internal/WixBuildTools.TestSupport/MsbuildUtilities.cs renamed
+12 -4
@@ -17,9 +17,6 @@ namespace WixToolsetTest.Sdk
17
18 public static class MsbuildUtilities
19 {
20 - public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildUtilities).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk");
21 - public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props");
22 -
20 public static MsbuildRunnerResult BuildProject(BuildSystem buildSystem, string projectPath, string[] arguments = null, string configuration = "Release", bool? outOfProc = null, string verbosityLevel = "normal", bool suppressValidation = true)
21 {
22 var allArgs = new List<string>
@@ -27,7 +24,6 @@ namespace WixToolsetTest.Sdk
24 $"-verbosity:{verbosityLevel}",
25 $"-p:Configuration={configuration}",
26 $"-p:SuppressValidation={suppressValidation}",
30 - GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildUtilities.WixPropsPath),
27 // Node reuse means that child msbuild processes can stay around after the build completes.
28 // Under that scenario, the root msbuild does not reliably close its streams which causes us to hang.
29 "-nr:false",
@@ -74,11 +70,23 @@ namespace WixToolsetTest.Sdk
70 {
71 case BuildSystem.DotNetCoreSdk:
72 {
73 + // If the value ends with a backslash, double-escape it (it should end up with four backslashes).
74 + if (valueToQuote?.EndsWith("\\") == true)
75 + {
76 + valueToQuote += @"\\\";
77 + }
78 +
79 return $"-p:{propertyName}=\\\"{valueToQuote}\\\"";
80 }
81 case BuildSystem.MSBuild:
82 case BuildSystem.MSBuild64:
83 {
84 + // If the value ends with a backslash, escape it.
85 + if (valueToQuote?.EndsWith("\\") == true)
86 + {
87 + valueToQuote += @"\";
88 + }
89 +
90 return $"-p:{propertyName}=\"{valueToQuote}\"";
91 }
92 default:
src/test/burn/TestData/Manual/BundleB/BundleB.wixproj
+1
@@ -22,6 +22,7 @@
22 <ProjectReference Include="..\PackageA\PackageA.wixproj" />
23 </ItemGroup>
24 <ItemGroup>
25 + <PackageReference Include="WixToolset.Heat" />
26 <PackageReference Include="WixToolset.Bal.wixext" />
27 </ItemGroup>
28 <!-- We do this dynamically to avoid committing so many files to source control. -->
src/testresultfilelist.txt
+1 -1
@@ -15,7 +15,7 @@ build/logs/TestResults/WixToolsetTest.Core.Burn.trx
15 build/logs/TestResults/WixToolsetTest.Core.Native.trx
16 build/logs/TestResults/WixToolsetTest.CoreIntegration.trx
17 build/logs/TestResults/WixToolsetTest.Dnc.HostGenerator.trx
18 -build/logs/TestResults/WixToolsetTest.Heat.trx
18 +build/logs/TestResults/WixToolsetTest.HeatTasks.trx
19 build/logs/TestResults/WixToolsetTest.ManagedHost.trx
20 build/logs/TestResults/WixToolsetTest.Mba.Core.trx
21 build/logs/TestResults/WixToolsetTest.MsiE2E.trx
src/tools/Directory.Build.props
+4
@@ -7,4 +7,8 @@
7 </PropertyGroup>
8
9 <Import Project="..\Directory.Build.props" />
10 +
11 + <PropertyGroup>
12 + <PublishRoot>$(OutputPath)publish\</PublishRoot>
13 + </PropertyGroup>
14 </Project>
src/tools/WixToolset.Heat/WixToolset.Heat.csproj new
+12
@@ -0,0 +1,12 @@
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 + <TargetFrameworks>netcoreapp3.1</TargetFrameworks>
7 + <Description>WiX Toolset Heat MSBuild integration</Description>
8 + <PublishDir>$(PublishRoot)WixToolset.Heat\</PublishDir>
9 + <NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
10 + <NuspecBasePath>$(PublishDir)</NuspecBasePath>
11 + </PropertyGroup>
12 +</Project>
src/tools/WixToolset.Heat/WixToolset.Heat.nuspec new
+20
@@ -0,0 +1,20 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
3 + <metadata>
4 + <id>$id$</id>
5 + <version>$version$</version>
6 + <title>$title$</title>
7 + <description>$description$</description>
8 + <authors>$authors$</authors>
9 + <license type="expression">MS-RL</license>
10 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
11 + <copyright>$copyright$</copyright>
12 + <projectUrl>$projectUrl$</projectUrl>
13 + <repository type="$repositorytype$" url="$repositoryurl$" commit="$repositorycommit$" />
14 + </metadata>
15 +
16 + <files>
17 + <file src="$projectFolder$\$id$.targets" target="build" />
18 + <file src="tools\**\*" target="tools" />
19 + </files>
20 +</package>
src/tools/WixToolset.Heat/WixToolset.Heat.targets renamed
+17 -12
@@ -5,16 +5,27 @@
5 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <!-- These properties can be overridden to support non-default installations. -->
7 <PropertyGroup>
8 - <HeatToolDir Condition=" '$(HeatToolDir)' == '' ">$(WixToolDir)</HeatToolDir>
8 + <WixHeatBinDir Condition=" '$(WixHeatBinDir)' == '' and '$(MSBuildRuntimeType)' == 'Core' ">$(MSBuildThisFileDirectory)..\tools\netcoreapp3.1\</WixHeatBinDir>
9 + <WixHeatBinDir Condition=" '$(WixHeatBinDir)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\</WixHeatBinDir>
10 + <WixHeatTasksPath Condition=" '$(WixHeatTasksPath)' == '' ">$(WixHeatBinDir)WixToolset.HeatTasks.dll</WixHeatTasksPath>
11 +
12 + <!--
13 + For backwards compatibility, the MSBuild tasks always default to the x86 heat.exe even though a x64 heat.exe is available.
14 + For "dotnet.exe build" the Heat tasks calculate the command-line to start heat.dll in .NET Core.
15 + -->
16 + <HeatToolDir Condition=" '$(HeatToolDir)' == '' and '$(MSBuildRuntimeType)' != 'Core' ">$(MSBuildThisFileDirectory)..\tools\net472\x86\</HeatToolDir>
17 +
18 + <HeatExe Condition=" '$(HeatExe)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\x86\heat.exe</HeatExe>
19 + <HeatExe64 Condition=" '$(HeatExe64)' == '' ">$(MSBuildThisFileDirectory)..\tools\net472\x64\heat.exe</HeatExe64>
20 </PropertyGroup>
21
22 <!-- These tasks are extensions for harvesting WiX source code from other sources. -->
12 - <UsingTask TaskName="HeatFile" AssemblyFile="$(WixTasksPath)" />
13 - <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixTasksPath)" />
14 - <UsingTask TaskName="HeatProject" AssemblyFile="$(WixTasksPath)" />
23 + <UsingTask TaskName="HeatFile" AssemblyFile="$(WixHeatTasksPath)" />
24 + <UsingTask TaskName="HeatDirectory" AssemblyFile="$(WixHeatTasksPath)" />
25 + <UsingTask TaskName="HeatProject" AssemblyFile="$(WixHeatTasksPath)" />
26
16 - <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
17 - <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixTasksPath)"/>
27 + <UsingTask TaskName="RefreshGeneratedFile" AssemblyFile="$(WixHeatTasksPath)"/>
28 + <UsingTask TaskName="RefreshBundleGeneratedFile" AssemblyFile="$(WixHeatTasksPath)"/>
29
30 <!-- Default Harvester properties-->
31 <PropertyGroup>
@@ -278,8 +289,6 @@
289 GenerateWixVariables="$(HarvestProjectsGenerateWixVariables)"
290 UseToolsVersion="$(HarvestProjectsUseToolsVersion)"
291 AdditionalOptions="$(HarvestProjectsAdditionalOptions)"
281 - RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
282 - ToolExe="$(HeatToolExe)"
292 ToolPath="$(HeatToolDir)">
293
294 <Output TaskParameter="OutputFile" ItemName="Compile" />
@@ -366,8 +375,6 @@
375 SuppressRootDirectory="%(HarvestDirectory.SuppressRootDirectory)"
376 SuppressRegistry="%(HarvestDirectory.SuppressRegistry)"
377 AdditionalOptions="$(HarvestDirectoryAdditionalOptions)"
369 - RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
370 - ToolExe="$(HeatToolExe)"
378 ToolPath="$(HeatToolDir)">
379
380 <Output TaskParameter="OutputFile" ItemName="Compile" />
@@ -442,8 +449,6 @@
449 SuppressRegistry="%(HarvestFile.SuppressRegistry)"
450 SuppressRootDirectory="%(HarvestFile.SuppressRootDirectory)"
451 AdditionalOptions="$(HarvestFileAdditionalOptions)"
445 - RunAsSeparateProcess="$(RunWixToolsOutOfProc)"
446 - ToolExe="$(HeatToolExe)"
452 ToolPath="$(HeatToolDir)">
453
454 <Output TaskParameter="OutputFile" ItemName="Compile" />
src/tools/WixToolset.HeatTasks/HeatDirectory.cs new
+47
@@ -0,0 +1,47 @@
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 WixToolset.HeatTasks
4 +{
5 + using Microsoft.Build.Framework;
6 +
7 + public sealed class HeatDirectory : HeatTask
8 + {
9 + public string ComponentGroupName { get; set; }
10 +
11 + [Required]
12 + public string Directory { get; set; }
13 +
14 + public string DirectoryRefId { get; set; }
15 +
16 + public bool KeepEmptyDirectories { get; set; }
17 +
18 + public string PreprocessorVariable { get; set; }
19 +
20 + public bool SuppressCom { get; set; }
21 +
22 + public bool SuppressRootDirectory { get; set; }
23 +
24 + public bool SuppressRegistry { get; set; }
25 +
26 + public string Template { get; set; }
27 +
28 + protected override string OperationName => "dir";
29 +
30 + protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
31 + {
32 + commandLineBuilder.AppendSwitch(this.OperationName);
33 + commandLineBuilder.AppendFileNameIfNotNull(this.Directory);
34 +
35 + commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
36 + commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
37 + commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories);
38 + commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
39 + commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
40 + commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
41 + commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
42 + commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
43 +
44 + base.BuildCommandLine(commandLineBuilder);
45 + }
46 + }
47 +}
src/tools/WixToolset.HeatTasks/HeatFile.cs new
+44
@@ -0,0 +1,44 @@
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 WixToolset.HeatTasks
4 +{
5 + using Microsoft.Build.Framework;
6 +
7 + public sealed class HeatFile : HeatTask
8 + {
9 + public string ComponentGroupName { get; set; }
10 +
11 + public string DirectoryRefId { get; set; }
12 +
13 + [Required]
14 + public string File { get; set; }
15 +
16 + public string PreprocessorVariable { get; set; }
17 +
18 + public bool SuppressCom { get; set; }
19 +
20 + public bool SuppressRegistry { get; set; }
21 +
22 + public bool SuppressRootDirectory { get; set; }
23 +
24 + public string Template { get; set; }
25 +
26 + protected override string OperationName => "file";
27 +
28 + protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
29 + {
30 + commandLineBuilder.AppendSwitch(this.OperationName);
31 + commandLineBuilder.AppendFileNameIfNotNull(this.File);
32 +
33 + commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
34 + commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
35 + commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
36 + commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
37 + commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
38 + commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
39 + commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
40 +
41 + base.BuildCommandLine(commandLineBuilder);
42 + }
43 + }
44 +}
src/tools/WixToolset.HeatTasks/HeatProject.cs renamed
+9 -47
@@ -1,64 +1,29 @@
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 WixToolset.BuildTasks
3 +namespace WixToolset.HeatTasks
4 {
5 using Microsoft.Build.Framework;
6
7 public sealed class HeatProject : HeatTask
8 {
9 - private string configuration;
10 - private string directoryIds;
11 - private string generateType;
12 - private bool generateWixVariables;
13 - private string platform;
14 - private string project;
15 - private string projectName;
9 private string[] projectOutputGroups;
10
18 - public string Configuration
19 - {
20 - get { return this.configuration; }
21 - set { this.configuration = value; }
22 - }
11 + public string Configuration { get; set; }
12
24 - public string DirectoryIds
25 - {
26 - get { return this.directoryIds; }
27 - set { this.directoryIds = value; }
28 - }
13 + public string DirectoryIds { get; set; }
14
30 - public bool GenerateWixVariables
31 - {
32 - get { return this.generateWixVariables; }
33 - set { this.generateWixVariables = value; }
34 - }
15 + public bool GenerateWixVariables { get; set; }
16
36 - public string GenerateType
37 - {
38 - get { return this.generateType; }
39 - set { this.generateType = value; }
40 - }
17 + public string GenerateType { get; set; }
18
19 public string MsbuildBinPath { get; set; }
20
44 - public string Platform
45 - {
46 - get { return this.platform; }
47 - set { this.platform = value; }
48 - }
21 + public string Platform { get; set; }
22
23 [Required]
51 - public string Project
52 - {
53 - get { return this.project; }
54 - set { this.project = value; }
55 - }
24 + public string Project { get; set; }
25
57 - public string ProjectName
58 - {
59 - get { return this.projectName; }
60 - set { this.projectName = value; }
61 - }
26 + public string ProjectName { get; set; }
27
28 public string[] ProjectOutputGroups
29 {
@@ -81,10 +46,7 @@ namespace WixToolset.BuildTasks
46
47 public bool UseToolsVersion { get; set; }
48
84 - protected override string OperationName
85 - {
86 - get { return "project"; }
87 - }
49 + protected override string OperationName => "project";
50
51 protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
52 {
src/tools/WixToolset.HeatTasks/HeatTask.cs new
+176
@@ -0,0 +1,176 @@
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 WixToolset.HeatTasks
4 +{
5 + using System;
6 + using System.IO;
7 + using System.Runtime.InteropServices;
8 + using Microsoft.Build.Framework;
9 + using Microsoft.Build.Utilities;
10 +
11 + /// <summary>
12 + /// A base MSBuild task to run the WiX harvester.
13 + /// Specific harvester tasks should extend this class.
14 + /// </summary>
15 + public abstract partial class HeatTask : ToolTask
16 + {
17 + private static readonly string ThisDllPath = new Uri(typeof(HeatTask).Assembly.CodeBase).AbsolutePath;
18 +
19 + /// <summary>
20 + /// Gets or sets additional options that are appended the the tool command-line.
21 + /// </summary>
22 + /// <remarks>
23 + /// This allows the task to support extended options in the tool which are not
24 + /// explicitly implemented as properties on the task.
25 + /// </remarks>
26 + public string AdditionalOptions { get; set; }
27 +
28 + /// <summary>
29 + /// Gets or sets whether to display the logo.
30 + /// </summary>
31 + public bool NoLogo { get; set; }
32 +
33 + /// <summary>
34 + /// Gets or sets whether all warnings should be suppressed.
35 + /// </summary>
36 + public bool SuppressAllWarnings { get; set; }
37 +
38 + /// <summary>
39 + /// Gets or sets a list of specific warnings to be suppressed.
40 + /// </summary>
41 + public string[] SuppressSpecificWarnings { get; set; }
42 +
43 + /// <summary>
44 + /// Gets or sets whether all warnings should be treated as errors.
45 + /// </summary>
46 + public bool TreatWarningsAsErrors { get; set; }
47 +
48 + /// <summary>
49 + /// Gets or sets a list of specific warnings to treat as errors.
50 + /// </summary>
51 + public string[] TreatSpecificWarningsAsErrors { get; set; }
52 +
53 + /// <summary>
54 + /// Gets or sets whether to display verbose output.
55 + /// </summary>
56 + public bool VerboseOutput { get; set; }
57 +
58 + public bool AutogenerateGuids { get; set; }
59 +
60 + public bool GenerateGuidsNow { get; set; }
61 +
62 + [Required]
63 + [Output]
64 + public ITaskItem OutputFile { get; set; }
65 +
66 + public bool SuppressFragments { get; set; }
67 +
68 + public bool SuppressUniqueIds { get; set; }
69 +
70 + public string[] Transforms { get; set; }
71 +
72 + protected sealed override string ToolName => "heat.exe";
73 +
74 + /// <summary>
75 + /// Gets the name of the heat operation performed by the task.
76 + /// </summary>
77 + /// <remarks>This is the first parameter passed on the heat.exe command-line.</remarks>
78 + /// <value>The name of the heat operation performed by the task.</value>
79 + protected abstract string OperationName { get; }
80 +
81 + private string ToolFullPath
82 + {
83 + get
84 + {
85 + if (String.IsNullOrEmpty(this.ToolPath))
86 + {
87 + return Path.Combine(Path.GetDirectoryName(ThisDllPath), this.ToolExe);
88 + }
89 +
90 + return Path.Combine(this.ToolPath, this.ToolExe);
91 + }
92 + }
93 +
94 + /// <summary>
95 + /// Get the path to the executable.
96 + /// </summary>
97 + /// <remarks>
98 + /// ToolTask only calls GenerateFullPathToTool when the ToolPath property is not set.
99 + /// WiX never sets the ToolPath property, but the user can through $(HeatToolDir).
100 + /// If we return only a file name, ToolTask will search the system paths for it.
101 + /// </remarks>
102 + protected sealed override string GenerateFullPathToTool()
103 + {
104 +#if NETCOREAPP
105 + // If we're not using heat.exe, use dotnet.exe to exec heat.dll.
106 + // See this.GenerateCommandLine() where "exec heat.dll" is added.
107 + if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath))
108 + {
109 + return DotnetFullPath;
110 + }
111 +
112 + return toolFullPath;
113 +#else
114 + return this.ToolFullPath;
115 +#endif
116 + }
117 +
118 + protected sealed override string GenerateCommandLineCommands()
119 + {
120 + var commandLineBuilder = new WixCommandLineBuilder();
121 +
122 +#if NETCOREAPP
123 + // If we're using dotnet.exe as the target executable, see this.GenerateFullPathToTool(),
124 + // then add "exec heat.dll" to the beginning of the command-line.
125 + if (!IsSelfExecutable(this.ToolFullPath, out var toolFullPath))
126 + {
127 + //commandLineBuilder.AppendSwitchIfNotNull("exec ", toolFullPath);
128 + commandLineBuilder.AppendSwitch($"exec \"{toolFullPath}\"");
129 + }
130 +#endif
131 +
132 + this.BuildCommandLine(commandLineBuilder);
133 + return commandLineBuilder.ToString();
134 + }
135 +
136 + /// <summary>
137 + /// Builds a command line from options in this task.
138 + /// </summary>
139 + protected virtual void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
140 + {
141 + commandLineBuilder.AppendIfTrue("-nologo", this.NoLogo);
142 + commandLineBuilder.AppendArrayIfNotNull("-sw", this.SuppressSpecificWarnings);
143 + commandLineBuilder.AppendIfTrue("-sw", this.SuppressAllWarnings);
144 + commandLineBuilder.AppendIfTrue("-v", this.VerboseOutput);
145 + commandLineBuilder.AppendArrayIfNotNull("-wx", this.TreatSpecificWarningsAsErrors);
146 + commandLineBuilder.AppendIfTrue("-wx", this.TreatWarningsAsErrors);
147 +
148 + commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids);
149 + commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow);
150 + commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments);
151 + commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds);
152 + commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms);
153 + commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
154 + commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
155 + }
156 +
157 +#if NETCOREAPP
158 + private static readonly string DotnetFullPath = Environment.GetEnvironmentVariable("DOTNET_HOST_PATH") ?? "dotnet";
159 +
160 + private static bool IsSelfExecutable(string proposedToolFullPath, out string toolFullPath)
161 + {
162 + var toolFullPathWithoutExtension = Path.Combine(Path.GetDirectoryName(proposedToolFullPath), Path.GetFileNameWithoutExtension(proposedToolFullPath));
163 + var exeExtension = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? ".exe" : String.Empty;
164 + var exeToolFullPath = $"{toolFullPathWithoutExtension}{exeExtension}";
165 + if (File.Exists(exeToolFullPath))
166 + {
167 + toolFullPath = exeToolFullPath;
168 + return true;
169 + }
170 +
171 + toolFullPath = $"{toolFullPathWithoutExtension}.dll";
172 + return false;
173 + }
174 +#endif
175 + }
176 +}
src/tools/WixToolset.HeatTasks/RefreshBundleGeneratedFile.cs renamed
+22 -35
@@ -1,6 +1,6 @@
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 WixToolset.BuildTasks
3 +namespace WixToolset.HeatTasks
4 {
5 using System;
6 using System.Collections;
@@ -8,48 +8,35 @@ namespace WixToolset.BuildTasks
8 using System.IO;
9 using System.Xml;
10 using Microsoft.Build.Framework;
11 - using Microsoft.Build.Utilities;
11
12 /// <summary>
13 /// This task refreshes the generated file for bundle projects.
14 /// </summary>
16 - public class RefreshBundleGeneratedFile : Task
15 + public class RefreshBundleGeneratedFile : RefreshTask
16 {
18 - /// <summary>
19 - /// The list of files to generate.
20 - /// </summary>
21 - [Required]
22 - public ITaskItem[] GeneratedFiles { get; set; }
23 -
24 - /// <summary>
25 - /// All the project references in the project.
26 - /// </summary>
27 - [Required]
28 - public ITaskItem[] ProjectReferencePaths { get; set; }
29 -
17 /// <summary>
18 /// Gets a complete list of external cabs referenced by the given installer database file.
19 /// </summary>
20 /// <returns>True upon completion of the task execution.</returns>
21 public override bool Execute()
22 {
36 - ArrayList payloadGroupRefs = new ArrayList();
37 - ArrayList packageGroupRefs = new ArrayList();
38 - for (int i = 0; i < this.ProjectReferencePaths.Length; i++)
23 + var payloadGroupRefs = new ArrayList();
24 + var packageGroupRefs = new ArrayList();
25 + for (var i = 0; i < this.ProjectReferencePaths.Length; i++)
26 {
40 - ITaskItem item = this.ProjectReferencePaths[i];
27 + var item = this.ProjectReferencePaths[i];
28
42 - if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest)))
29 + if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest)))
30 {
31 continue;
32 }
33
47 - string projectPath = item.GetMetadata("MSBuildSourceProjectFile");
48 - string projectName = Path.GetFileNameWithoutExtension(projectPath);
49 - string referenceName = ToolsCommon.GetIdentifierFromName(ToolsCommon.GetMetadataOrDefault(item, "Name", projectName));
34 + var projectPath = item.GetMetadata("MSBuildSourceProjectFile");
35 + var projectName = Path.GetFileNameWithoutExtension(projectPath);
36 + var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName));
37
51 - string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
52 - foreach (string pog in pogs)
38 + var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
39 + foreach (var pog in pogs)
40 {
41 if (!String.IsNullOrEmpty(pog))
42 {
@@ -60,43 +47,43 @@ namespace WixToolset.BuildTasks
47 }
48 }
49
63 - XmlDocument doc = new XmlDocument();
50 + var doc = new XmlDocument();
51
65 - XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
52 + var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
53 doc.AppendChild(head);
54
68 - XmlElement rootElement = doc.CreateElement("Wix");
55 + var rootElement = doc.CreateElement("Wix");
56 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
57 doc.AppendChild(rootElement);
58
72 - XmlElement fragment = doc.CreateElement("Fragment");
59 + var fragment = doc.CreateElement("Fragment");
60 rootElement.AppendChild(fragment);
61
75 - XmlElement payloadGroup = doc.CreateElement("PayloadGroup");
62 + var payloadGroup = doc.CreateElement("PayloadGroup");
63 payloadGroup.SetAttribute("Id", "Bundle.Generated.Payloads");
64 fragment.AppendChild(payloadGroup);
65
79 - XmlElement packageGroup = doc.CreateElement("PackageGroup");
66 + var packageGroup = doc.CreateElement("PackageGroup");
67 packageGroup.SetAttribute("Id", "Bundle.Generated.Packages");
68 fragment.AppendChild(packageGroup);
69
70 foreach (string payloadGroupRef in payloadGroupRefs)
71 {
85 - XmlElement payloadGroupRefElement = doc.CreateElement("PayloadGroupRef");
72 + var payloadGroupRefElement = doc.CreateElement("PayloadGroupRef");
73 payloadGroupRefElement.SetAttribute("Id", payloadGroupRef);
74 payloadGroup.AppendChild(payloadGroupRefElement);
75 }
76
77 foreach (string packageGroupRef in packageGroupRefs)
78 {
92 - XmlElement packageGroupRefElement = doc.CreateElement("PackageGroupRef");
79 + var packageGroupRefElement = doc.CreateElement("PackageGroupRef");
80 packageGroupRefElement.SetAttribute("Id", packageGroupRef);
81 packageGroup.AppendChild(packageGroupRefElement);
82 }
83
97 - foreach (ITaskItem item in this.GeneratedFiles)
84 + foreach (var item in this.GeneratedFiles)
85 {
99 - string fullPath = item.GetMetadata("FullPath");
86 + var fullPath = item.GetMetadata("FullPath");
87
88 payloadGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Payloads");
89 packageGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath) + ".Packages");
src/tools/WixToolset.HeatTasks/RefreshGeneratedFile.cs renamed
+20 -32
@@ -1,6 +1,6 @@
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 WixToolset.BuildTasks
3 +namespace WixToolset.HeatTasks
4 {
5 using System;
6 using System.Collections;
@@ -8,48 +8,36 @@ namespace WixToolset.BuildTasks
8 using System.IO;
9 using System.Xml;
10 using Microsoft.Build.Framework;
11 - using Microsoft.Build.Utilities;
11
12 /// <summary>
13 /// This task refreshes the generated file that contains ComponentGroupRefs
14 /// to harvested output.
15 /// </summary>
17 - public class RefreshGeneratedFile : Task
16 + public class RefreshGeneratedFile : RefreshTask
17 {
19 - /// <summary>
20 - /// The list of files to generate.
21 - /// </summary>
22 - [Required]
23 - public ITaskItem[] GeneratedFiles { get; set; }
24 -
25 - /// <summary>
26 - /// All the project references in the project.
27 - /// </summary>
28 - [Required]
29 - public ITaskItem[] ProjectReferencePaths { get; set; }
30 -
18 /// <summary>
19 /// Gets a complete list of external cabs referenced by the given installer database file.
20 /// </summary>
21 /// <returns>True upon completion of the task execution.</returns>
22 public override bool Execute()
23 {
37 - ArrayList componentGroupRefs = new ArrayList();
38 - for (int i = 0; i < this.ProjectReferencePaths.Length; i++)
24 + var componentGroupRefs = new ArrayList();
25 +
26 + for (var i = 0; i < this.ProjectReferencePaths.Length; i++)
27 {
40 - ITaskItem item = this.ProjectReferencePaths[i];
28 + var item = this.ProjectReferencePaths[i];
29
42 - if (!String.IsNullOrEmpty(item.GetMetadata(ToolsCommon.DoNotHarvest)))
30 + if (!String.IsNullOrEmpty(item.GetMetadata(DoNotHarvest)))
31 {
32 continue;
33 }
34
47 - string projectPath = item.GetMetadata("MSBuildSourceProjectFile");
48 - string projectName = Path.GetFileNameWithoutExtension(projectPath);
49 - string referenceName = ToolsCommon.GetIdentifierFromName(ToolsCommon.GetMetadataOrDefault(item, "Name", projectName));
35 + var projectPath = item.GetMetadata("MSBuildSourceProjectFile");
36 + var projectName = Path.GetFileNameWithoutExtension(projectPath);
37 + var referenceName = GetIdentifierFromName(GetMetadataOrDefault(item, "Name", projectName));
38
51 - string[] pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
52 - foreach (string pog in pogs)
39 + var pogs = item.GetMetadata("RefProjectOutputGroups").Split(';');
40 + foreach (var pog in pogs)
41 {
42 if (!String.IsNullOrEmpty(pog))
43 {
@@ -58,32 +46,32 @@ namespace WixToolset.BuildTasks
46 }
47 }
48
61 - XmlDocument doc = new XmlDocument();
49 + var doc = new XmlDocument();
50
63 - XmlProcessingInstruction head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
51 + var head = doc.CreateProcessingInstruction("xml", "version='1.0' encoding='UTF-8'");
52 doc.AppendChild(head);
53
66 - XmlElement rootElement = doc.CreateElement("Wix");
54 + var rootElement = doc.CreateElement("Wix");
55 rootElement.SetAttribute("xmlns", "http://wixtoolset.org/schemas/v4/wxs");
56 doc.AppendChild(rootElement);
57
70 - XmlElement fragment = doc.CreateElement("Fragment");
58 + var fragment = doc.CreateElement("Fragment");
59 rootElement.AppendChild(fragment);
60
73 - XmlElement componentGroup = doc.CreateElement("ComponentGroup");
61 + var componentGroup = doc.CreateElement("ComponentGroup");
62 componentGroup.SetAttribute("Id", "Product.Generated");
63 fragment.AppendChild(componentGroup);
64
65 foreach (string componentGroupRef in componentGroupRefs)
66 {
79 - XmlElement componentGroupRefElement = doc.CreateElement("ComponentGroupRef");
67 + var componentGroupRefElement = doc.CreateElement("ComponentGroupRef");
68 componentGroupRefElement.SetAttribute("Id", componentGroupRef);
69 componentGroup.AppendChild(componentGroupRefElement);
70 }
71
84 - foreach (ITaskItem item in this.GeneratedFiles)
72 + foreach (var item in this.GeneratedFiles)
73 {
86 - string fullPath = item.GetMetadata("FullPath");
74 + var fullPath = item.GetMetadata("FullPath");
75
76 componentGroup.SetAttribute("Id", Path.GetFileNameWithoutExtension(fullPath));
77 try
src/tools/WixToolset.HeatTasks/RefreshTask.cs new
+59
@@ -0,0 +1,59 @@
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 WixToolset.HeatTasks
4 +{
5 + using System;
6 + using System.Text.RegularExpressions;
7 + using Microsoft.Build.Framework;
8 + using Microsoft.Build.Utilities;
9 +
10 + /// <summary>
11 + /// A base MSBuild task to refresh generated files.
12 + /// </summary>
13 + public abstract class RefreshTask : Task
14 + {
15 + private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]");
16 + private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}"); // non 'words' and assorted valid characters
17 +
18 + /// <summary>Metadata key name to turn off harvesting of project references.</summary>
19 + protected const string DoNotHarvest = "DoNotHarvest";
20 +
21 + /// <summary>
22 + /// The list of files to generate.
23 + /// </summary>
24 + [Required]
25 + public ITaskItem[] GeneratedFiles { get; set; }
26 +
27 + /// <summary>
28 + /// All the project references in the project.
29 + /// </summary>
30 + [Required]
31 + public ITaskItem[] ProjectReferencePaths { get; set; }
32 +
33 + /// <summary>
34 + /// Return an identifier based on passed file/directory name
35 + /// </summary>
36 + /// <param name="name">File/directory name to generate identifer from</param>
37 + /// <returns>A version of the name that is a legal identifier.</returns>
38 + /// <remarks>This is duplicated from WiX's Common class.</remarks>
39 + protected static string GetIdentifierFromName(string name)
40 + {
41 + var result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_".
42 +
43 + // MSI identifiers must begin with an alphabetic character or an
44 + // underscore. Prefix all other values with an underscore.
45 + if (AddPrefix.IsMatch(name))
46 + {
47 + result = String.Concat("_", result);
48 + }
49 +
50 + return result;
51 + }
52 +
53 + protected static string GetMetadataOrDefault(ITaskItem item, string metadataName, string defaultValue)
54 + {
55 + var value = item.GetMetadata(metadataName);
56 + return String.IsNullOrWhiteSpace(value) ? defaultValue : value;
57 + }
58 + }
59 +}
src/tools/WixToolset.HeatTasks/WixCommandLineBuilder.cs new
+56
@@ -0,0 +1,56 @@
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 WixToolset.HeatTasks
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using Microsoft.Build.Utilities;
8 +
9 + /// <summary>
10 + /// Helper class for appending the command line arguments.
11 + /// </summary>
12 + public class WixCommandLineBuilder : CommandLineBuilder
13 + {
14 + /// <summary>
15 + /// Append a switch to the command line if the condition is true.
16 + /// </summary>
17 + /// <param name="switchName">Switch to append.</param>
18 + /// <param name="condition">Condition specified by the user.</param>
19 + public void AppendIfTrue(string switchName, bool condition)
20 + {
21 + if (condition)
22 + {
23 + this.AppendSwitch(switchName);
24 + }
25 + }
26 +
27 + /// <summary>
28 + /// Append a switch to the command line if any values in the array have been specified.
29 + /// </summary>
30 + /// <param name="switchName">Switch to append.</param>
31 + /// <param name="values">Values specified by the user.</param>
32 + public void AppendArrayIfNotNull(string switchName, IEnumerable<string> values)
33 + {
34 + if (values != null)
35 + {
36 + foreach (var value in values)
37 + {
38 + this.AppendSwitchIfNotNull(switchName, value);
39 + }
40 + }
41 + }
42 +
43 + /// <summary>
44 + /// Append arbitrary text to the command-line if specified.
45 + /// </summary>
46 + /// <param name="textToAppend">Text to append.</param>
47 + public void AppendTextIfNotNull(string textToAppend)
48 + {
49 + if (!String.IsNullOrWhiteSpace(textToAppend))
50 + {
51 + this.AppendSpaceIfNotEmpty();
52 + this.AppendTextUnquoted(textToAppend);
53 + }
54 + }
55 + }
56 +}
src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj new
+17
@@ -0,0 +1,17 @@
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 + <TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
7 + <Title>WiX Toolset Heat MSBuild Tasks</Title>
8 + <DebugType>embedded</DebugType>
9 + <PublishRepositoryUrl>true</PublishRepositoryUrl>
10 + <!-- https://github.com/Microsoft/msbuild/issues/2360 -->
11 + <PlatformTarget>AnyCPU</PlatformTarget>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <PackageReference Include="Microsoft.Build.Tasks.Core" />
16 + </ItemGroup>
17 +</Project>
src/tools/heat/AssemblyHarvester.cs renamed
src/tools/heat/ConsoleMessageListener.cs new
+90
@@ -0,0 +1,90 @@
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 WixToolset.Tools.Core
4 +{
5 + using System;
6 + using System.Collections.Generic;
7 + using System.Globalization;
8 + using System.Text;
9 + using System.Threading;
10 + using WixToolset.Data;
11 + using WixToolset.Extensibility;
12 + using WixToolset.Extensibility.Services;
13 +
14 + public sealed class ConsoleMessageListener : IMessageListener
15 + {
16 + public ConsoleMessageListener(string prefix, string appName)
17 + {
18 + this.Prefix = prefix;
19 + this.AppName = appName;
20 +
21 + PrepareConsoleForLocalization();
22 + }
23 +
24 + public string AppName { get; }
25 +
26 + public string Prefix { get; }
27 +
28 + public void Write(Message message)
29 + {
30 + var filename = message.SourceLineNumbers?.FileName ?? this.AppName;
31 + var type = message.Level.ToString().ToLowerInvariant();
32 + var output = message.Level >= MessageLevel.Warning ? Console.Out : Console.Error;
33 +
34 + if (message.SourceLineNumbers?.LineNumber.HasValue == true)
35 + {
36 + filename = String.Concat(filename, "(", message.SourceLineNumbers?.LineNumber.Value, ")");
37 + }
38 +
39 + output.WriteLine("{0} : {1} {2}{3:0000}: {4}", filename, type, this.Prefix, message.Id, message.ToString());
40 +
41 + var fileNames = GetFileNames(message.SourceLineNumbers);
42 + if (fileNames.Count > 1)
43 + {
44 + foreach (var fileName in fileNames)
45 + {
46 + output.WriteLine("Source trace: {0}", fileName);
47 + }
48 + }
49 + }
50 +
51 + public void Write(string message) => Console.Out.WriteLine(message);
52 +
53 + public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel;
54 +
55 + private static IList<string> GetFileNames(SourceLineNumber sourceLineNumbers)
56 + {
57 + var fileNames = new List<string>();
58 +
59 + for (var sln = sourceLineNumbers; null != sln; sln = sln.Parent)
60 + {
61 + if (String.IsNullOrEmpty(sln.FileName))
62 + {
63 + continue;
64 + }
65 + else if (sln.LineNumber.HasValue)
66 + {
67 + fileNames.Add(String.Format(CultureInfo.CurrentUICulture, "{0}: line {1}", sln.FileName, sln.LineNumber));
68 + }
69 + else
70 + {
71 + fileNames.Add(sln.FileName);
72 + }
73 + }
74 +
75 + return fileNames;
76 + }
77 +
78 + private static void PrepareConsoleForLocalization()
79 + {
80 + Thread.CurrentThread.CurrentUICulture = CultureInfo.CurrentUICulture.GetConsoleFallbackUICulture();
81 +
82 + if (Console.OutputEncoding.CodePage != Encoding.UTF8.CodePage &&
83 + Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.OEMCodePage &&
84 + Console.OutputEncoding.CodePage != Thread.CurrentThread.CurrentUICulture.TextInfo.ANSICodePage)
85 + {
86 + Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
87 + }
88 + }
89 + }
90 +}
src/tools/heat/Data/HarvesterErrors.cs renamed
src/tools/heat/Data/HarvesterVerboses.cs renamed
src/tools/heat/Data/HarvesterWarnings.cs renamed
src/tools/heat/Data/HeatCommandLineOption.cs renamed
src/tools/heat/Data/IHeatCommandLine.cs renamed
src/tools/heat/DirectoryHarvester.cs renamed
src/tools/heat/DllHarvester.cs renamed
src/tools/heat/Extensibility/BaseHarvesterExtension.cs renamed
src/tools/heat/Extensibility/BaseHeatExtension.cs renamed
src/tools/heat/Extensibility/BaseMutatorExtension.cs renamed
src/tools/heat/Extensibility/IHarvester.cs renamed
src/tools/heat/Extensibility/IHarvesterCore.cs renamed
src/tools/heat/Extensibility/IHarvesterExtension.cs renamed
src/tools/heat/Extensibility/IHeatCore.cs renamed
src/tools/heat/Extensibility/IHeatExtension.cs renamed
src/tools/heat/Extensibility/IMutator.cs renamed
src/tools/heat/Extensibility/IMutatorExtension.cs renamed
src/tools/heat/FileHarvester.cs renamed
src/tools/heat/Harvester.cs renamed
src/tools/heat/HarvesterCore.cs renamed
src/tools/heat/HeatCommand.cs renamed
src/tools/heat/HeatCommandLine.cs renamed
src/tools/heat/HeatCommandLineFactory.cs renamed
src/tools/heat/HeatCore.cs renamed
src/tools/heat/HelpCommand.cs renamed
src/tools/heat/IIsFinalizeHarvesterMutator.cs renamed
src/tools/heat/IIsHarvesterMutator.cs renamed
src/tools/heat/IIsHeatExtension.cs renamed
src/tools/heat/IIsWebSiteHarvester.cs renamed
src/tools/heat/Mutator.cs renamed
src/tools/heat/PerformanceCategoryHarvester.cs renamed
src/tools/heat/Program.cs renamed
+1 -3
@@ -7,7 +7,6 @@ namespace WixToolset.Tools.Heat
7 using System.Threading;
8 using System.Threading.Tasks;
9 using WixToolset.Core;
10 - using WixToolset.Core.Burn;
10 using WixToolset.Data;
11 using WixToolset.Extensibility;
12 using WixToolset.Extensibility.Data;
@@ -29,8 +28,7 @@ namespace WixToolset.Tools.Heat
28 [MTAThread]
29 public static async Task<int> Main(string[] args)
30 {
32 - var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider()
33 - .AddBundleBackend();
31 + var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
32 var listener = new ConsoleMessageListener("HEAT", "heat.exe");
33
34 try
src/tools/heat/RegFileHarvester.cs renamed
src/tools/heat/RegistryHarvester.cs renamed
src/tools/heat/Serialize/CodeDomInterfaces.cs renamed
src/tools/heat/Serialize/CodeDomReader.cs renamed
src/tools/heat/Serialize/ElementCollection.cs renamed
src/tools/heat/Serialize/WixHarvesterStrings.Designer.cs renamed
src/tools/heat/Serialize/WixHarvesterStrings.resx renamed
src/tools/heat/Serialize/iis.cs renamed
src/tools/heat/Serialize/util.cs renamed
src/tools/heat/Serialize/vs.cs renamed
src/tools/heat/Serialize/wix.cs renamed
src/tools/heat/TypeLibraryHarvester.cs renamed
src/tools/heat/UtilFinalizeHarvesterMutator.cs renamed
src/tools/heat/UtilHarvesterMutator.cs renamed
src/tools/heat/UtilHeatExtension.cs renamed
-8
@@ -5,10 +5,7 @@ namespace WixToolset.Harvesters
5 using System;
6 using System.Collections.Generic;
7 using System.IO;
8 - using WixToolset.Core.Burn.Interfaces;
8 using WixToolset.Data;
10 - using WixToolset.Data.Symbols;
11 - using WixToolset.Extensibility.Services;
9 using WixToolset.Harvesters.Data;
10 using WixToolset.Harvesters.Extensibility;
11
@@ -19,11 +16,8 @@ namespace WixToolset.Harvesters
16 {
17 public UtilHeatExtension(IServiceProvider serviceProvider)
18 {
22 - this.PayloadHarvester = serviceProvider.GetService<IPayloadHarvester>();
19 }
20
25 - private IPayloadHarvester PayloadHarvester { get; }
26 -
21 /// <summary>
22 /// Gets the supported command line types for this extension.
23 /// </summary>
@@ -36,8 +30,6 @@ namespace WixToolset.Harvesters
30 {
31 new HeatCommandLineOption("dir", "harvest a directory"),
32 new HeatCommandLineOption("file", "harvest a file"),
39 - new HeatCommandLineOption("exepackagepayload", "harvest a bundle payload as ExePackagePayload"),
40 - new HeatCommandLineOption("msupackagepayload", "harvest a bundle payload as MsuPackagePayload"),
33 new HeatCommandLineOption("perf", "harvest performance counters"),
34 new HeatCommandLineOption("reg", "harvest a .reg file"),
35 new HeatCommandLineOption("-ag", "autogenerate component guids at compile time"),
src/tools/heat/UtilMutator.cs renamed
src/tools/heat/UtilTransformMutator.cs renamed
src/tools/heat/VSHeatExtension.cs renamed
src/tools/heat/VSProjectHarvester.cs renamed
src/tools/heat/app.config renamed
src/tools/heat/heat.csproj renamed
+3 -8
@@ -6,20 +6,15 @@
6 <TargetFrameworks>netcoreapp3.1;net472</TargetFrameworks>
7 <OutputType>Exe</OutputType>
8 <Description>Harvester</Description>
9 - <Title>WiX Harvester</Title>
9 + <Title>WiX Toolset Harvester</Title>
10 <DebugType>embedded</DebugType>
11 <PublishRepositoryUrl>true</PublishRepositoryUrl>
12 - <!-- <PackAsTool>true</PackAsTool> -->
12 <RuntimeIdentifiers Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp3.1' ">win-x86;win-x64</RuntimeIdentifiers>
13 <AppConfig>app.config</AppConfig>
14 <ApplicationManifest>heat.exe.manifest</ApplicationManifest>
15 <RollForward>LatestMajor</RollForward>
16 </PropertyGroup>
17
19 - <ItemGroup>
20 - <Compile Include="..\wix\ConsoleMessageListener.cs" Link="ConsoleMessageListener.cs" />
21 - </ItemGroup>
22 -
18 <ItemGroup>
19 <Compile Update="Serialize\WixHarvesterStrings.Designer.cs">
20 <DesignTime>True</DesignTime>
@@ -36,8 +31,8 @@
31 </ItemGroup>
32
33 <ItemGroup>
39 - <ProjectReference Include="..\WixToolset.Core\WixToolset.Core.csproj" />
40 - <ProjectReference Include="..\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj" />
34 + <PackageReference Include="WixToolset.Core" />
35 + <PackageReference Include="WixToolset.Core.Burn" />
36 </ItemGroup>
37
38 <ItemGroup>
src/tools/heat/heat.exe.manifest renamed
src/tools/heat/heat.net461.v3.ncrunchproject renamed
src/tools/heat/heat.netcoreapp2.1.v3.ncrunchproject renamed
src/tools/publish_t.proj new
+36
@@ -0,0 +1,36 @@
1 +<Project Sdk="Microsoft.Build.Traversal">
2 + <PropertyGroup>
3 + <StagePublishX86>$(BaseIntermediateOutputPath)$(Configuration)\net472\x86\</StagePublishX86>
4 + <StagePublishX64>$(BaseIntermediateOutputPath)$(Configuration)\net472\x64\</StagePublishX64>
5 + <StagePublishDnc>$(BaseIntermediateOutputPath)$(Configuration)\netcoreapp3.1\</StagePublishDnc>
6 +
7 + <PublishBuildFolder>$(PublishRoot)WixToolset.Heat\build\</PublishBuildFolder>
8 + <PublishHere>$(PublishRoot)WixToolset.Heat\tools\net472\</PublishHere>
9 + <PublishX86>$(PublishRoot)WixToolset.Heat\tools\net472\x86\</PublishX86>
10 + <PublishX64>$(PublishRoot)WixToolset.Heat\tools\net472\x64\</PublishX64>
11 + <PublishDnc>$(PublishRoot)WixToolset.Heat\tools\netcoreapp3.1\</PublishDnc>
12 + </PropertyGroup>
13 +
14 + <ItemGroup>
15 + <ProjectReference Include="WixToolset.HeatTasks\WixToolset.HeatTasks.csproj" Properties="TargetFramework=net472;PublishDir=$(StagePublishX86)WixToolset.HeatTasks" Targets="Publish" />
16 + <ProjectReference Include="WixToolset.HeatTasks\WixToolset.HeatTasks.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(StagePublishDnc)WixToolset.HeatTasks" Targets="Publish" />
17 +
18 + <!-- heat.exe doesn't need to filter any files so publish it straight into its final location -->
19 + <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(PublishX86)" Targets="Publish" />
20 + <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(PublishX64)" Targets="Publish" />
21 + <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(PublishDnc)" Targets="Publish" />
22 + </ItemGroup>
23 +
24 + <Target Name="CopyToFinalPublishFolder" AfterTargets="Build">
25 + <ItemGroup>
26 + <From Include="WixToolset.Heat\WixToolset.Heat.targets" To="$(PublishBuildFolder)" />
27 + <From Include="$(StagePublishX86)\WixToolset.HeatTasks\*.*" Exclude="$(StagePublishx86)\WixToolset.HeatTasks\Microsoft.Build.*.dll" To="$(PublishHere)" />
28 + <From Include="$(StagePublishDnc)\WixToolset.HeatTasks\*.*" Exclude="$(StagePublishDnc)\WixToolset.HeatTasks\Microsoft.Build.*.dll" To="$(PublishDnc)" />
29 + </ItemGroup>
30 +
31 + <Copy SourceFiles="@(From)"
32 + DestinationFiles="%(To)%(RecursiveDir)%(Filename)%(Extension)"
33 + SkipUnchangedFiles="true"
34 + UseHardlinksIfPossible="true" />
35 + </Target>
36 +</Project>
src/tools/test/Directory.Build.props new
+10
@@ -0,0 +1,10 @@
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>
5 + <Import Project="..\Directory.Build.props" />
6 +
7 + <PropertyGroup>
8 + <OutputPath>$(OutputPath)test\$(ProjectName)</OutputPath>
9 + </PropertyGroup>
10 +</Project>
src/tools/test/WixToolsetTest.Heat/HeatRunner.cs renamed
src/tools/test/WixToolsetTest.Heat/WixToolsetTest.Heat.csproj renamed
-5
@@ -8,11 +8,6 @@
8 <SignOutput>false</SignOutput>
9 </PropertyGroup>
10
11 - <ItemGroup>
12 - <ProjectReference Include="..\..\heat\heat.csproj" />
13 - <ProjectReference Include="..\..\WixToolset.Core.TestPackage\WixToolset.Core.TestPackage.csproj" />
14 - </ItemGroup>
15 -
11 <ItemGroup>
12 <PackageReference Include="WixBuildTools.TestSupport" />
13 </ItemGroup>
src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs renamed
+70 -35
@@ -3,7 +3,6 @@
3 namespace WixToolsetTest.Sdk
4 {
5 using System;
6 - using System.Collections.Generic;
6 using System.IO;
7 using System.Linq;
8 using WixBuildTools.TestSupport;
@@ -14,23 +13,34 @@ namespace WixToolsetTest.Sdk
13
14 public class MsbuildHeatFixture
15 {
16 + public static readonly string HeatTargetsPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildHeatFixture).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Heat", "build", "WixToolset.Heat.targets");
17 +
18 + public MsbuildHeatFixture()
19 + {
20 + EnsureWixSdkCached();
21 + }
22 +
23 [Theory]
24 [InlineData(BuildSystem.DotNetCoreSdk)]
25 [InlineData(BuildSystem.MSBuild)]
26 [InlineData(BuildSystem.MSBuild64)]
27 public void CanBuildHeatFilePackage(BuildSystem buildSystem)
28 {
23 - var sourceFolder = TestData.Get(@"TestData\HeatFilePackage");
29 + var sourceFolder = TestData.Get("TestData", "HeatFilePackage");
30
25 - using (var fs = new TestDataFolderFileSystem())
31 + using (var fs = new DisposableFileSystem())
32 {
27 - fs.Initialize(sourceFolder);
28 - var baseFolder = fs.BaseFolder;
29 - var binFolder = Path.Combine(baseFolder, @"bin\");
33 + var baseFolder = fs.GetFolder();
34 + var binFolder = Path.Combine(baseFolder, @"bin");
35 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
31 - var projectPath = Path.Combine(baseFolder, "HeatFilePackage.wixproj");
36 + var projectPath = Path.Combine(sourceFolder, "HeatFilePackage.wixproj");
37
33 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
38 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
39 + "-Restore",
40 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
41 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder),
42 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder),
43 + });
44 result.AssertSuccess();
45
46 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
@@ -39,9 +49,7 @@ namespace WixToolsetTest.Sdk
49 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
50 WixAssert.StringCollectionEmpty(warnings);
51
42 - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
43 - Assert.True(File.Exists(generatedFilePath));
44 -
52 + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ProductComponents_INSTALLFOLDER_HeatFilePackage.wixproj_file.wxs");
53 var generatedContents = File.ReadAllText(generatedFilePath);
54 var testXml = generatedContents.GetTestXml();
55 WixAssert.StringEqual(@"<Wix>" +
@@ -59,9 +67,7 @@ namespace WixToolsetTest.Sdk
67 "</Fragment>" +
68 "</Wix>", testXml);
69
62 - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFilePackage.wixpdb");
63 - Assert.True(File.Exists(pdbPath));
64 -
70 + var pdbPath = Path.Combine(binFolder, "HeatFilePackage.wixpdb");
71 var intermediate = Intermediate.Load(pdbPath);
72 var section = intermediate.Sections.Single();
73
@@ -76,17 +82,21 @@ namespace WixToolsetTest.Sdk
82 [InlineData(BuildSystem.MSBuild64)]
83 public void CanBuildHeatFileWithMultipleFilesPackage(BuildSystem buildSystem)
84 {
79 - var sourceFolder = TestData.Get(@"TestData\HeatFileMultipleFilesSameFileName");
85 + var sourceFolder = TestData.Get(@"TestData", "HeatFileMultipleFilesSameFileName");
86
81 - using (var fs = new TestDataFolderFileSystem())
87 + using (var fs = new DisposableFileSystem())
88 {
83 - fs.Initialize(sourceFolder);
84 - var baseFolder = fs.BaseFolder;
89 + var baseFolder = fs.GetFolder();
90 var binFolder = Path.Combine(baseFolder, @"bin\");
91 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
87 - var projectPath = Path.Combine(baseFolder, "HeatFileMultipleFilesSameFileName.wixproj");
92 + var projectPath = Path.Combine(sourceFolder, "HeatFileMultipleFilesSameFileName.wixproj");
93
89 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
94 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
95 + "-Restore",
96 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
97 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "BaseIntermediateOutputPath", intermediateFolder),
98 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "OutputPath", binFolder),
99 + });
100 result.AssertSuccess();
101
102 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true);
@@ -95,7 +105,7 @@ namespace WixToolsetTest.Sdk
105 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
106 WixAssert.StringCollectionEmpty(warnings);
107
98 - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
108 + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_TxtProductComponents_INSTALLFOLDER_MyProgram.txt_file.wxs");
109 Assert.True(File.Exists(generatedFilePath));
110
111 var generatedContents = File.ReadAllText(generatedFilePath);
@@ -115,7 +125,7 @@ namespace WixToolsetTest.Sdk
125 "</Fragment>" +
126 "</Wix>", testXml);
127
118 - generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
128 + generatedFilePath = Path.Combine(intermediateFolder, "Release", "_JsonProductComponents_INSTALLFOLDER_MyProgram.json_file.wxs");
129 Assert.True(File.Exists(generatedFilePath));
130
131 generatedContents = File.ReadAllText(generatedFilePath);
@@ -135,7 +145,7 @@ namespace WixToolsetTest.Sdk
145 "</Fragment>" +
146 "</Wix>", testXml);
147
138 - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatFileMultipleFilesSameFileName.wixpdb");
148 + var pdbPath = Path.Combine(binFolder, "HeatFileMultipleFilesSameFileName.wixpdb");
149 Assert.True(File.Exists(pdbPath));
150
151 var intermediate = Intermediate.Load(pdbPath);
@@ -156,11 +166,13 @@ namespace WixToolsetTest.Sdk
166 [InlineData(BuildSystem.MSBuild64, false)]
167 public void CanBuildHeatProjectPreSdkStyle(BuildSystem buildSystem, bool useToolsVersion)
168 {
159 - var sourceFolder = TestData.Get(@"TestData\HeatProject");
169 + var sourceFolder = TestData.Get(@"TestData", "HeatProject");
170
171 using (var fs = new TestDataFolderFileSystem())
172 {
173 fs.Initialize(sourceFolder);
174 + File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json"));
175 +
176 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectPreSdkStyle");
177 var binFolder = Path.Combine(baseFolder, @"bin\");
178 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
@@ -168,8 +180,9 @@ namespace WixToolsetTest.Sdk
180
181 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
182 {
171 - useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
172 - });
183 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
184 + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
185 + });
186 result.AssertSuccess();
187
188 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
@@ -187,7 +200,7 @@ namespace WixToolsetTest.Sdk
200 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
201 WixAssert.StringCollectionEmpty(warnings);
202
190 - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_ToolsVersion4Cs.wxs");
203 + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_ToolsVersion4Cs.wxs");
204 Assert.True(File.Exists(generatedFilePath));
205
206 var generatedContents = File.ReadAllText(generatedFilePath);
@@ -246,7 +259,7 @@ namespace WixToolsetTest.Sdk
259 "</Fragment>" +
260 "</Wix>", testXml);
261
249 - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectPreSdkStyle.wixpdb");
262 + var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectPreSdkStyle.wixpdb");
263 Assert.True(File.Exists(pdbPath));
264
265 var intermediate = Intermediate.Load(pdbPath);
@@ -271,22 +284,26 @@ namespace WixToolsetTest.Sdk
284 using (var fs = new TestDataFolderFileSystem())
285 {
286 fs.Initialize(sourceFolder);
287 + File.Copy("global.json", Path.Combine(fs.BaseFolder, "global.json"));
288 +
289 var baseFolder = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle");
290 var binFolder = Path.Combine(baseFolder, @"bin\");
291 var intermediateFolder = Path.Combine(baseFolder, @"obj\");
277 - var projectPath = Path.Combine(baseFolder, "HeatProjectSdkStyle.wixproj");
292 + var projectPath = Path.Combine(fs.BaseFolder, "HeatProjectSdkStyle", "HeatProjectSdkStyle.wixproj");
293 var referencedProjectPath = Path.Combine(fs.BaseFolder, "SdkStyleCs", "SdkStyleCs.csproj");
294
295 var result = MsbuildUtilities.BuildProject(buildSystem, referencedProjectPath, new[]
296 {
282 - "-t:restore",
283 - });
297 + "-t:restore",
298 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
299 + });
300 result.AssertSuccess();
301
302 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
303 {
288 - useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
289 - });
304 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "HeatTargetsPath", MsbuildHeatFixture.HeatTargetsPath),
305 + useToolsVersion ? $"-p:HarvestProjectsUseToolsVersion=true" : String.Empty,
306 + });
307 result.AssertSuccess();
308
309 var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true);
@@ -304,7 +321,7 @@ namespace WixToolsetTest.Sdk
321 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
322 WixAssert.StringCollectionEmpty(warnings);
323
307 - var generatedFilePath = Path.Combine(intermediateFolder, "x86", "Release", "_SdkStyleCs.wxs");
324 + var generatedFilePath = Path.Combine(intermediateFolder, "Release", "_SdkStyleCs.wxs");
325 Assert.True(File.Exists(generatedFilePath));
326
327 var generatedContents = File.ReadAllText(generatedFilePath);
@@ -361,7 +378,7 @@ namespace WixToolsetTest.Sdk
378 "</Fragment>" +
379 "</Wix>", testXml);
380
364 - var pdbPath = Path.Combine(binFolder, "x86", "Release", "HeatProjectSdkStyle.wixpdb");
381 + var pdbPath = Path.Combine(binFolder, "Release", "HeatProjectSdkStyle.wixpdb");
382 Assert.True(File.Exists(pdbPath));
383
384 var intermediate = Intermediate.Load(pdbPath);
@@ -371,5 +388,23 @@ namespace WixToolsetTest.Sdk
388 WixAssert.StringEqual(Path.Combine(fs.BaseFolder, "SdkStyleCs", "bin", "Release", "netstandard2.0\\\\SdkStyleCs.dll"), fileSymbol[FileSymbolFields.Source].AsPath()?.Path);
389 }
390 }
391 +
392 + /// <summary>
393 + /// This method exists to get the WixToolset.Sdk.nupkg into the NuGet package cache using the global.json
394 + /// and nuget.config in the root of the repository. By pre-caching the WiX SDK, the rest of the tests will
395 + /// pull the binaries out of the cache instead of needing to find the original .nupkg in the build artifacts
396 + /// folder (which requires use of nuget.config found in the root of the repo)
397 + /// </summary>
398 + private static void EnsureWixSdkCached()
399 + {
400 + // This EnsureWixSdkCached project exists only to pre-cache the WixToolset.Sdk for use by later projects.
401 + var sourceFolder = TestData.Get("TestData", "EnsureWixSdkCached");
402 +
403 + var result = MsbuildUtilities.BuildProject(BuildSystem.DotNetCoreSdk, Path.Combine(sourceFolder, "EnsureWixSdkCached.wixproj"), new[]
404 + {
405 + "-t:restore",
406 + });
407 + result.AssertSuccess();
408 + }
409 }
410 }
src/tools/test/WixToolsetTest.HeatTasks/TestData/EnsureWixSdkCached/EnsureWixSdkCached.wixproj new
+4
@@ -0,0 +1,4 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 + <!-- This project exists only to pre-cache the WixToolset.Sdk for use by the other test data projects. -->
4 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj new
+26
@@ -0,0 +1,26 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 +
4 + <ItemGroup>
5 + <BindInputPaths Include="." />
6 + </ItemGroup>
7 +
8 + <PropertyGroup>
9 + <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
10 + </PropertyGroup>
11 +
12 + <ItemGroup>
13 + <HarvestFile Include="MyProgram.txt">
14 + <ComponentGroupName>TxtProductComponents</ComponentGroupName>
15 + <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
16 + <SuppressRootDirectory>true</SuppressRootDirectory>
17 + </HarvestFile>
18 + <HarvestFile Include="MyProgram.json">
19 + <ComponentGroupName>JsonProductComponents</ComponentGroupName>
20 + <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
21 + <SuppressRootDirectory>true</SuppressRootDirectory>
22 + </HarvestFile>
23 + </ItemGroup>
24 +
25 + <Import Project="$(HeatTargetsPath)" />
26 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.json renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/MyProgram.txt renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFileMultipleFilesSameFileName/Package.wxs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/HeatFilePackage.wixproj new
+21
@@ -0,0 +1,21 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 +
4 + <ItemGroup>
5 + <BindInputPaths Include="." />
6 + </ItemGroup>
7 +
8 + <PropertyGroup>
9 + <HarvestFileSuppressUniqueIds>true</HarvestFileSuppressUniqueIds>
10 + </PropertyGroup>
11 +
12 + <ItemGroup>
13 + <HarvestFile Include="HeatFilePackage.wixproj">
14 + <ComponentGroupName>ProductComponents</ComponentGroupName>
15 + <DirectoryRefId>INSTALLFOLDER</DirectoryRefId>
16 + <SuppressRootDirectory>true</SuppressRootDirectory>
17 + </HarvestFile>
18 + </ItemGroup>
19 +
20 + <Import Project="$(HeatTargetsPath)" />
21 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatFilePackage/Package.wxs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj new
+18
@@ -0,0 +1,18 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 +
4 + <ItemGroup>
5 + <BindInputPaths Include="." />
6 + </ItemGroup>
7 +
8 + <PropertyGroup>
9 + <EnableProjectHarvesting>true</EnableProjectHarvesting>
10 + <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
11 + </PropertyGroup>
12 +
13 + <ItemGroup>
14 + <ProjectReference Include="..\ToolsVersion4Cs\ToolsVersion4Cs.csproj" />
15 + </ItemGroup>
16 +
17 + <Import Project="$(HeatTargetsPath)" />
18 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectPreSdkStyle/Package.wxs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj new
+18
@@ -0,0 +1,18 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<Project Sdk="WixToolset.Sdk">
3 +
4 + <ItemGroup>
5 + <BindInputPaths Include="." />
6 + </ItemGroup>
7 +
8 + <PropertyGroup>
9 + <EnableProjectHarvesting>true</EnableProjectHarvesting>
10 + <HarvestProjectsSuppressUniqueIds>true</HarvestProjectsSuppressUniqueIds>
11 + </PropertyGroup>
12 +
13 + <ItemGroup>
14 + <ProjectReference Include="..\SdkStyleCs\SdkStyleCs.csproj" />
15 + </ItemGroup>
16 +
17 + <Import Project="$(HeatTargetsPath)" />
18 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/HeatProjectSdkStyle/Package.wxs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.cs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/SdkStyleCs/SdkStyleCs.csproj renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/Properties/AssemblyInfo.cs renamed
src/tools/test/WixToolsetTest.HeatTasks/TestData/HeatProject/ToolsVersion4Cs/ToolsVersion4Cs.csproj renamed
src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.csproj new
+28
@@ -0,0 +1,28 @@
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>net472</TargetFramework>
7 + <IsPackable>false</IsPackable>
8 + <DebugType>embedded</DebugType>
9 + <DefaultItemExcludes>TestData\**;$(DefaultItemExcludes)</DefaultItemExcludes>
10 + <SignOutput>false</SignOutput>
11 + </PropertyGroup>
12 +
13 + <ItemGroup>
14 + <Content Include="TestData\**" CopyToOutputDirectory="PreserveNewest" />
15 + <Content Include="..\..\..\..\global.json" CopyToOutputDirectory="PreserveNewest" />
16 + </ItemGroup>
17 +
18 + <ItemGroup>
19 + <PackageReference Include="WixBuildTools.TestSupport" />
20 + <PackageReference Include="WixToolset.Core.TestPackage" />
21 + </ItemGroup>
22 +
23 + <ItemGroup>
24 + <PackageReference Include="Microsoft.NET.Test.Sdk" />
25 + <PackageReference Include="xunit" />
26 + <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
27 + </ItemGroup>
28 +</Project>
src/tools/test/WixToolsetTest.HeatTasks/WixToolsetTest.HeatTasks.v3.ncrunchproject new
+5
@@ -0,0 +1,5 @@
1 +<ProjectConfiguration>
2 + <Settings>
3 + <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
4 + </Settings>
5 +</ProjectConfiguration>
\ No newline at end of file
src/tools/thmviewer/thmviewer.v3.ncrunchproject
+1
@@ -3,5 +3,6 @@
3 <AdditionalFilesToIncludeForProject>
4 <Value>thmviewer.manifest</Value>
5 </AdditionalFilesToIncludeForProject>
6 + <IgnoreThisComponentCompletely>True</IgnoreThisComponentCompletely>
7 </Settings>
8 </ProjectConfiguration>
\ No newline at end of file
src/tools/tools.cmd
+26 -3
@@ -2,17 +2,40 @@
2 @pushd %~dp0
3
4 @set _C=Debug
5 +@set _L=%~dp0..\..\build\logs
6 +
7 :parse_args
8 @if /i "%1"=="release" set _C=Release
9 +@if /i "%1"=="inc" set _INCREMENTAL=1
10 +@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
11 @if not "%1"=="" shift & goto parse_args
12
13 +:: Clean
14 +@if NOT "%_INCREMENTAL%"=="" call :clean
15 +@if NOT "%_CLEAN%"=="" goto :end
16 +
17 @echo Building tools %_C%
18
11 -:: tools
19 +:: Build
20 +msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b
21 +
22 +:: Publish
23 +msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b
24 +
25 +:: Test
26 +dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.HeatTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.HeatTasks.trx" || exit /b
27 +
28 +:: Pack
29 +msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:..\..\build\logs\tools_pack.binlog || exit /b
30
13 -nuget restore || exit /b
31 +@goto :end
32
15 -msbuild -t:Build -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b
33 +:clean
34 +@rd /s/q "..\..\build\tools" 2> nul
35 +@del "..\..\build\artifacts\WixToolset.Heat.*.nupkg" 2> nul
36 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.heat" 2> nul
37 +@exit /b
38
39 +:end
40 @popd
41 @endlocal
src/tools/tools.sln
+48 -4
@@ -1,11 +1,20 @@
1 -
1 Microsoft Visual Studio Solution File, Format Version 12.00
3 -# Visual Studio Version 16
4 -VisualStudioVersion = 16.0.30711.63
2 +# Visual Studio Version 17
3 +VisualStudioVersion = 17.2.32616.157
4 MinimumVisualStudioVersion = 15.0.26124.0
5 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}"
6 EndProject
8 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}"
7 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Templates", "WixToolset.Templates\WixToolset.Templates.csproj", "{D1385232-CA10-4092-BAB5-4E5499FE144C}"
8 +EndProject
9 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Heat", "WixToolset.Heat\WixToolset.Heat.csproj", "{4B301D2D-43D3-4000-8132-36C5A1E9F8F0}"
10 +EndProject
11 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "heat\heat.csproj", "{6C747707-29DE-429E-87A4-F6F81DD146C6}"
12 +EndProject
13 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{F7A815A5-37AE-4EC4-A6D6-B29565055668}"
14 +EndProject
15 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.HeatTasks", "WixToolset.HeatTasks\WixToolset.HeatTasks.csproj", "{EBDCA232-17CD-40CE-B592-CD7230388BEF}"
16 +EndProject
17 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.HeatTasks", "test\WixToolsetTest.HeatTasks\WixToolsetTest.HeatTasks.csproj", "{3FB7F972-31A6-4929-B6BF-EACEC659A7D3}"
18 EndProject
19 Global
20 GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -30,10 +39,45 @@ Global
39 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|Any CPU.Build.0 = Release|Any CPU
40 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.ActiveCfg = Release|Any CPU
41 {D1385232-CA10-4092-BAB5-4E5499FE144C}.Release|x86.Build.0 = Release|Any CPU
42 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
43 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|Any CPU.Build.0 = Debug|Any CPU
44 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.ActiveCfg = Debug|Any CPU
45 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Debug|x86.Build.0 = Debug|Any CPU
46 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.ActiveCfg = Release|Any CPU
47 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|Any CPU.Build.0 = Release|Any CPU
48 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.ActiveCfg = Release|Any CPU
49 + {4B301D2D-43D3-4000-8132-36C5A1E9F8F0}.Release|x86.Build.0 = Release|Any CPU
50 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|Any CPU.Build.0 = Debug|Any CPU
52 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.ActiveCfg = Debug|Any CPU
53 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Debug|x86.Build.0 = Debug|Any CPU
54 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.ActiveCfg = Release|Any CPU
55 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|Any CPU.Build.0 = Release|Any CPU
56 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.ActiveCfg = Release|Any CPU
57 + {6C747707-29DE-429E-87A4-F6F81DD146C6}.Release|x86.Build.0 = Release|Any CPU
58 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
59 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
60 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.ActiveCfg = Debug|Any CPU
61 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Debug|x86.Build.0 = Debug|Any CPU
62 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
63 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|Any CPU.Build.0 = Release|Any CPU
64 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.ActiveCfg = Release|Any CPU
65 + {EBDCA232-17CD-40CE-B592-CD7230388BEF}.Release|x86.Build.0 = Release|Any CPU
66 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
67 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|Any CPU.Build.0 = Debug|Any CPU
68 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.ActiveCfg = Debug|Any CPU
69 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Debug|x86.Build.0 = Debug|Any CPU
70 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.ActiveCfg = Release|Any CPU
71 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|Any CPU.Build.0 = Release|Any CPU
72 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.ActiveCfg = Release|Any CPU
73 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3}.Release|x86.Build.0 = Release|Any CPU
74 EndGlobalSection
75 GlobalSection(SolutionProperties) = preSolution
76 HideSolutionNode = FALSE
77 EndGlobalSection
78 + GlobalSection(NestedProjects) = preSolution
79 + {3FB7F972-31A6-4929-B6BF-EACEC659A7D3} = {F7A815A5-37AE-4EC4-A6D6-B29565055668}
80 + EndGlobalSection
81 GlobalSection(ExtensibilityGlobals) = postSolution
82 SolutionGuid = {537F1116-39FE-4AED-A9A2-35030E5750D5}
83 EndGlobalSection
src/tools/tools.v3.ncrunchsolution new
+6
@@ -0,0 +1,6 @@
1 +<SolutionConfiguration>
2 + <Settings>
3 + <AllowParallelTestExecution>True</AllowParallelTestExecution>
4 + <SolutionConfigured>True</SolutionConfigured>
5 + </Settings>
6 +</SolutionConfiguration>
\ No newline at end of file
src/wix/WixToolset.BuildTasks/HeatDirectory.cs deleted
-96
@@ -1,96 +0,0 @@
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 WixToolset.BuildTasks
4 -{
5 - using Microsoft.Build.Framework;
6 -
7 - public sealed class HeatDirectory : HeatTask
8 - {
9 - private string directory;
10 - private bool keepEmptyDirectories;
11 - private bool suppressCom;
12 - private bool suppressRootDirectory;
13 - private bool suppressRegistry;
14 - private string template;
15 - private string componentGroupName;
16 - private string directoryRefId;
17 - private string preprocessorVariable;
18 -
19 - public string ComponentGroupName
20 - {
21 - get { return this.componentGroupName; }
22 - set { this.componentGroupName = value; }
23 - }
24 -
25 - [Required]
26 - public string Directory
27 - {
28 - get { return this.directory; }
29 - set { this.directory = value; }
30 - }
31 -
32 - public string DirectoryRefId
33 - {
34 - get { return this.directoryRefId; }
35 - set { this.directoryRefId = value; }
36 - }
37 -
38 - public bool KeepEmptyDirectories
39 - {
40 - get { return this.keepEmptyDirectories; }
41 - set { this.keepEmptyDirectories = value; }
42 - }
43 -
44 - public string PreprocessorVariable
45 - {
46 - get { return this.preprocessorVariable; }
47 - set { this.preprocessorVariable = value; }
48 - }
49 -
50 - public bool SuppressCom
51 - {
52 - get { return this.suppressCom; }
53 - set { this.suppressCom = value; }
54 - }
55 -
56 - public bool SuppressRootDirectory
57 - {
58 - get { return this.suppressRootDirectory; }
59 - set { this.suppressRootDirectory = value; }
60 - }
61 -
62 - public bool SuppressRegistry
63 - {
64 - get { return this.suppressRegistry; }
65 - set { this.suppressRegistry = value; }
66 - }
67 -
68 - public string Template
69 - {
70 - get { return this.template; }
71 - set { this.template = value; }
72 - }
73 -
74 - protected override string OperationName
75 - {
76 - get { return "dir"; }
77 - }
78 -
79 - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
80 - {
81 - commandLineBuilder.AppendSwitch(this.OperationName);
82 - commandLineBuilder.AppendFileNameIfNotNull(this.Directory);
83 -
84 - commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
85 - commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
86 - commandLineBuilder.AppendIfTrue("-ke", this.KeepEmptyDirectories);
87 - commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
88 - commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
89 - commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
90 - commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
91 - commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
92 -
93 - base.BuildCommandLine(commandLineBuilder);
94 - }
95 - }
96 -}
src/wix/WixToolset.BuildTasks/HeatFile.cs deleted
-88
@@ -1,88 +0,0 @@
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 WixToolset.BuildTasks
4 -{
5 - using Microsoft.Build.Framework;
6 -
7 - public sealed class HeatFile : HeatTask
8 - {
9 - private string file;
10 - private bool suppressCom;
11 - private bool suppressRegistry;
12 - private bool suppressRootDirectory;
13 - private string template;
14 - private string componentGroupName;
15 - private string directoryRefId;
16 - private string preprocessorVariable;
17 -
18 - public string ComponentGroupName
19 - {
20 - get { return this.componentGroupName; }
21 - set { this.componentGroupName = value; }
22 - }
23 -
24 - public string DirectoryRefId
25 - {
26 - get { return this.directoryRefId; }
27 - set { this.directoryRefId = value; }
28 - }
29 -
30 - [Required]
31 - public string File
32 - {
33 - get { return this.file; }
34 - set { this.file = value; }
35 - }
36 -
37 - public string PreprocessorVariable
38 - {
39 - get { return this.preprocessorVariable; }
40 - set { this.preprocessorVariable = value; }
41 - }
42 -
43 - public bool SuppressCom
44 - {
45 - get { return this.suppressCom; }
46 - set { this.suppressCom = value; }
47 - }
48 -
49 - public bool SuppressRegistry
50 - {
51 - get { return this.suppressRegistry; }
52 - set { this.suppressRegistry = value; }
53 - }
54 -
55 - public bool SuppressRootDirectory
56 - {
57 - get { return this.suppressRootDirectory; }
58 - set { this.suppressRootDirectory = value; }
59 - }
60 -
61 - public string Template
62 - {
63 - get { return this.template; }
64 - set { this.template = value; }
65 - }
66 -
67 - protected override string OperationName
68 - {
69 - get { return "file"; }
70 - }
71 -
72 - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
73 - {
74 - commandLineBuilder.AppendSwitch(this.OperationName);
75 - commandLineBuilder.AppendFileNameIfNotNull(this.File);
76 -
77 - commandLineBuilder.AppendSwitchIfNotNull("-cg ", this.ComponentGroupName);
78 - commandLineBuilder.AppendSwitchIfNotNull("-dr ", this.DirectoryRefId);
79 - commandLineBuilder.AppendIfTrue("-scom", this.SuppressCom);
80 - commandLineBuilder.AppendIfTrue("-srd", this.SuppressRootDirectory);
81 - commandLineBuilder.AppendIfTrue("-sreg", this.SuppressRegistry);
82 - commandLineBuilder.AppendSwitchIfNotNull("-template ", this.Template);
83 - commandLineBuilder.AppendSwitchIfNotNull("-var ", this.PreprocessorVariable);
84 -
85 - base.BuildCommandLine(commandLineBuilder);
86 - }
87 - }
88 -}
src/wix/WixToolset.BuildTasks/HeatTask.cs deleted
-91
@@ -1,91 +0,0 @@
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 WixToolset.BuildTasks
4 -{
5 - using Microsoft.Build.Framework;
6 -
7 - /// <summary>
8 - /// A base MSBuild task to run the WiX harvester.
9 - /// Specific harvester tasks should extend this class.
10 - /// </summary>
11 - public abstract partial class HeatTask : ToolsetTask
12 - {
13 - private bool autogenerageGuids;
14 - private bool generateGuidsNow;
15 - private ITaskItem outputFile;
16 - private bool suppressFragments;
17 - private bool suppressUniqueIds;
18 - private string[] transforms;
19 -
20 - public HeatTask()
21 - {
22 - this.RunAsSeparateProcess = true;
23 - }
24 -
25 - public bool AutogenerateGuids
26 - {
27 - get { return this.autogenerageGuids; }
28 - set { this.autogenerageGuids = value; }
29 - }
30 -
31 - public bool GenerateGuidsNow
32 - {
33 - get { return this.generateGuidsNow; }
34 - set { this.generateGuidsNow = value; }
35 - }
36 -
37 - [Required]
38 - [Output]
39 - public ITaskItem OutputFile
40 - {
41 - get { return this.outputFile; }
42 - set { this.outputFile = value; }
43 - }
44 -
45 - public bool SuppressFragments
46 - {
47 - get { return this.suppressFragments; }
48 - set { this.suppressFragments = value; }
49 - }
50 -
51 - public bool SuppressUniqueIds
52 - {
53 - get { return this.suppressUniqueIds; }
54 - set { this.suppressUniqueIds = value; }
55 - }
56 -
57 - public string[] Transforms
58 - {
59 - get { return this.transforms; }
60 - set { this.transforms = value; }
61 - }
62 -
63 - protected sealed override string ToolName => "heat.exe";
64 -
65 - /// <summary>
66 - /// Gets the name of the heat operation performed by the task.
67 - /// </summary>
68 - /// <remarks>This is the first parameter passed on the heat.exe command-line.</remarks>
69 - /// <value>The name of the heat operation performed by the task.</value>
70 - protected abstract string OperationName
71 - {
72 - get;
73 - }
74 -
75 - /// <summary>
76 - /// Builds a command line from options in this task.
77 - /// </summary>
78 - protected override void BuildCommandLine(WixCommandLineBuilder commandLineBuilder)
79 - {
80 - base.BuildCommandLine(commandLineBuilder);
81 -
82 - commandLineBuilder.AppendIfTrue("-ag", this.AutogenerateGuids);
83 - commandLineBuilder.AppendIfTrue("-gg", this.GenerateGuidsNow);
84 - commandLineBuilder.AppendIfTrue("-sfrag", this.SuppressFragments);
85 - commandLineBuilder.AppendIfTrue("-suid", this.SuppressUniqueIds);
86 - commandLineBuilder.AppendArrayIfNotNull("-t ", this.Transforms);
87 - commandLineBuilder.AppendTextIfNotNull(this.AdditionalOptions);
88 - commandLineBuilder.AppendSwitchIfNotNull("-out ", this.OutputFile);
89 - }
90 - }
91 -}
src/wix/WixToolset.BuildTasks/HeatTask_InProc.cs deleted
-20
@@ -1,20 +0,0 @@
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 -#if !NETCOREAPP
4 -namespace WixToolset.BuildTasks
5 -{
6 - using System;
7 - using System.Threading;
8 - using System.Threading.Tasks;
9 - using WixToolset.Extensibility.Services;
10 -
11 - public partial class HeatTask
12 - {
13 - public override bool RunAsSeparateProcess { get => true; }
14 -
15 - protected sealed override string TaskShortName => "HEAT";
16 -
17 - protected sealed override Task<int> ExecuteCoreAsync(IWixToolsetCoreServiceProvider coreProvider, string commandLineString, CancellationToken cancellationToken) => throw new NotImplementedException();
18 - }
19 -}
20 -#endif
src/wix/WixToolset.Sdk/WixToolset.Sdk.csproj
-1
@@ -13,7 +13,6 @@
13 <ItemGroup>
14 <Content Include="build\$(MSBuildThisFileName).props" CopyToOutputDirectory="PreserveNewest" />
15 <Content Include="build\$(MSBuildThisFileName).targets" CopyToOutputDirectory="PreserveNewest" />
16 - <Content Include="tools\wix.harvest.targets" CopyToOutputDirectory="PreserveNewest" />
16 <Content Include="tools\WixToolset.Signing.targets" CopyToOutputDirectory="PreserveNewest" />
17 <Content Include="tools\wix.props" CopyToOutputDirectory="PreserveNewest" />
18 <Content Include="tools\wix.targets" CopyToOutputDirectory="PreserveNewest" />
src/wix/WixToolset.Sdk/tools/wix.targets
-2
@@ -34,7 +34,6 @@
34 </PropertyGroup>
35
36 <PropertyGroup>
37 - <WixHarvestTargetsPath Condition=" '$(WixHarvestTargetsPath)' == '' ">$(MSBuildThisFileDirectory)wix.harvest.targets</WixHarvestTargetsPath>
37 <WixSigningTargetsPath Condition=" '$(WixSigningTargetsPath)' == '' ">$(MSBuildThisFileDirectory)WixToolset.Signing.targets</WixSigningTargetsPath>
38 </PropertyGroup>
39
@@ -966,7 +965,6 @@
965 -->
966 </Target>
967
969 - <Import Project="$(WixHarvestTargetsPath)" Condition=" '$(WixHarvestTargetsPath)' != '' and Exists('$(WixHarvestTargetsPath)')" />
968 <Import Project="$(WixSigningTargetsPath)" />
969
970 <!-- Extension point: Define CustomAfterWixTargets to a .targets file that you want to include after this file. -->
src/wix/publish_t.proj
-3
@@ -3,15 +3,12 @@
3 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=netcoreapp3.1;PublishDir=$(BaseOutputPath)$(Configuration)\publish\wix\" Targets="Publish" />
4
5 <ProjectReference Include="WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x86\buildtasks\" Targets="Publish" />
6 - <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x86\heat\" Targets="Publish" />
6 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x86;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x86\wix\" Targets="Publish" />
7
8 <ProjectReference Include="WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x64\buildtasks\" Targets="Publish" />
10 - <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x64\heat\" Targets="Publish" />
9 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=net472;RuntimeIdentifier=win-x64;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\net472\x64\wix\" Targets="Publish" />
10
11 <ProjectReference Include="WixToolset.BuildTasks\WixToolset.BuildTasks.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks\" Targets="Publish" />
14 - <ProjectReference Include="heat\heat.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\netcoreapp3.1\heat\" Targets="Publish" />
12 <ProjectReference Include="wix\wix.csproj" Properties="TargetFramework=netcoreapp3.1;UseAppHost=false;PublishDir=$(BaseIntermediateOutputPath)$(Configuration)\WixToolset.Sdk\separate\netcoreapp3.1\wix\" Targets="Publish" />
13 </ItemGroup>
14 </Project>
src/wix/test/WixToolsetTest.BuildTasks/WixToolsetTest.BuildTasks.csproj
-2
@@ -32,7 +32,5 @@
32 <PackageReference Include="Microsoft.NET.Test.Sdk" />
33 <PackageReference Include="xunit" />
34 <PackageReference Include="xunit.runner.visualstudio" PrivateAssets="All" />
35 - <PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" />
36 - <PackageReference Include="GitInfo" PrivateAssets="All" />
35 </ItemGroup>
36 </Project>
src/wix/test/WixToolsetTest.Sdk/MsbuildFixture.cs
+31 -7
@@ -11,6 +11,9 @@ namespace WixToolsetTest.Sdk
11
12 public class MsbuildFixture
13 {
14 + public static readonly string WixMsbuildPath = Path.Combine(Path.GetDirectoryName(new Uri(typeof(MsbuildFixture).Assembly.CodeBase).AbsolutePath), "..", "..", "..", "publish", "WixToolset.Sdk");
15 + public static readonly string WixPropsPath = Path.Combine(WixMsbuildPath, "build", "WixToolset.Sdk.props");
16 +
17 [Theory]
18 [InlineData(BuildSystem.DotNetCoreSdk)]
19 [InlineData(BuildSystem.MSBuild)]
@@ -26,7 +29,10 @@ namespace WixToolsetTest.Sdk
29 var binFolder = Path.Combine(baseFolder, @"bin\");
30 var projectPath = Path.Combine(baseFolder, "SimpleBundle.wixproj");
31
29 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" });
32 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
33 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
34 + "-p:SignOutput=true",
35 + });
36 result.AssertSuccess();
37
38 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
@@ -66,7 +72,10 @@ namespace WixToolsetTest.Sdk
72 var binFolder = Path.Combine(baseFolder, @"bin\");
73 var projectPath = Path.Combine(baseFolder, "UncompressedBundle.wixproj");
74
69 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" });
75 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
76 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
77 + "-p:SignOutput=true"
78 + });
79 result.AssertSuccess();
80
81 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
@@ -106,7 +115,9 @@ namespace WixToolsetTest.Sdk
115 var binFolder = Path.Combine(baseFolder, @"bin\");
116 var projectPath = Path.Combine(baseFolder, "SimpleMergeModule.wixproj");
117
109 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
118 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
119 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
120 + });
121 result.AssertSuccess();
122
123 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
@@ -142,7 +153,10 @@ namespace WixToolsetTest.Sdk
153 var binFolder = Path.Combine(baseFolder, @"bin\");
154 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
155
145 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] { "-p:SignOutput=true" });
156 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
157 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
158 + "-p:SignOutput=true"
159 + });
160 result.AssertSuccess();
161
162 var platformSwitches = result.Output.Where(line => line.Contains("-platform x86"));
@@ -208,7 +222,9 @@ namespace WixToolsetTest.Sdk
222 var binFolder = Path.Combine(baseFolder, @"bin\");
223 var projectPath = Path.Combine(baseFolder, "MergeMsiPackage.wixproj");
224
211 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath);
225 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
226 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
227 + });
228 result.AssertSuccess();
229
230 var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray();
@@ -270,6 +286,7 @@ namespace WixToolsetTest.Sdk
286
287 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
288 {
289 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
290 wixpdbType == null ? String.Empty : $"-p:WixPdbType={wixpdbType}",
291 "-p:SuppressValidation=true"
292 });
@@ -300,6 +317,7 @@ namespace WixToolsetTest.Sdk
317
318 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
319 {
320 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
321 $"-p:Platform=x64",
322 });
323 result.AssertSuccess();
@@ -337,6 +355,7 @@ namespace WixToolsetTest.Sdk
355
356 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
357 {
358 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
359 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressIces", "ICE12"),
360 }, suppressValidation: false);
361 result.AssertSuccess();
@@ -360,6 +379,7 @@ namespace WixToolsetTest.Sdk
379
380 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
381 {
382 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
383 MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "SuppressSpecificWarnings", "1118;1102"),
384 });
385 result.AssertSuccess();
@@ -389,6 +409,7 @@ namespace WixToolsetTest.Sdk
409
410 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
411 {
412 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
413 "-p:OutputType=IntermediatePostLink",
414 }, outOfProc: outOfProc);
415 result.AssertSuccess();
@@ -418,7 +439,9 @@ namespace WixToolsetTest.Sdk
439 var projectPath = Path.Combine(baseFolder, "MsiPackage.wixproj");
440
441 // Build
421 - var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, verbosityLevel: "diag");
442 + var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[] {
443 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath)
444 + }, verbosityLevel: "diag");
445 result.AssertSuccess();
446
447 var buildOutput = String.Join("\r\n", result.Output);
@@ -432,6 +455,7 @@ namespace WixToolsetTest.Sdk
455 // Clean
456 result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
457 {
458 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixMSBuildProps", MsbuildFixture.WixPropsPath),
459 "-t:Clean",
460 }, verbosityLevel: "diag");
461 result.AssertSuccess();
@@ -477,7 +501,7 @@ namespace WixToolsetTest.Sdk
501
502 var result = MsbuildUtilities.BuildProject(buildSystem, projectPath, new[]
503 {
480 - MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildUtilities.WixMsbuildPath, "broken", "net461")),
504 + MsbuildUtilities.GetQuotedPropertySwitch(buildSystem, "WixToolDir", Path.Combine(MsbuildFixture.WixMsbuildPath, "broken", "net461")),
505 }, outOfProc: true);
506 Assert.Equal(1, result.ExitCode);
507
src/wix/test/WixToolsetTest.Sdk/TestData/HeatFileMultipleFilesSameFileName/HeatFileMultipleFilesSameFileName.wixproj deleted
-58
@@ -1,58 +0,0 @@
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
src/wix/test/WixToolsetTest.Sdk/TestData/HeatFilePackage/HeatFilePackage.wixproj deleted
-53
@@ -1,53 +0,0 @@
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
src/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectPreSdkStyle/HeatProjectPreSdkStyle.wixproj deleted
-50
@@ -1,50 +0,0 @@
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/wix/test/WixToolsetTest.Sdk/TestData/HeatProject/HeatProjectSdkStyle/HeatProjectSdkStyle.wixproj deleted
-50
@@ -1,50 +0,0 @@
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/wix/wix.cmd
+1 -5
@@ -30,22 +30,18 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core -l "trx;LogFile
30 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Burn -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Burn.trx" || exit /b
31 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Core.Native -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Core.Native.trx" || exit /b
32 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.CoreIntegration -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.CoreIntegration.trx" || exit /b
33 -dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Heat -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Heat.trx" || exit /b
33
34
35 :: Publish
36 msbuild publish_t.proj -p:Configuration=%_C% -nologo -warnaserror -bl:%_L%\wix_publish.binlog || exit /b
37
38 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\buildtasks %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO% /XF Microsoft.Build.*.dll
40 -robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\heat %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO%
39 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x86\wix %_P%\WixToolset.Sdk\tools\net472\x86 %_RCO%
40
41 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\buildtasks %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO% /XF Microsoft.Build.*.dll
44 -robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\heat %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO%
42 robocopy %_P_OBJ%\WixToolset.Sdk\separate\net472\x64\wix %_P%\WixToolset.Sdk\tools\net472\x64 %_RCO%
43
44 robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\buildtasks %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO% /XF Microsoft.Build.*.dll
48 -robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\heat %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
45 robocopy %_P_OBJ%\WixToolset.Sdk\separate\netcoreapp3.1\wix %_P%\WixToolset.Sdk\tools\netcoreapp3.1 %_RCO%
46
47 msbuild -t:Publish -p:Configuration=%_C% -nologo -warnaserror WixToolset.Sdk\WixToolset.Sdk.csproj -bl:%_L%\wix_sdk_publish.binlog || exit /b
@@ -59,7 +55,7 @@ dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.BuildTasks -l "trx;L
55 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.Sdk -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Sdk.trx" || exit /b
56
57 :: Pack
62 -msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\wix_pack.binlog || exit /b
58 +msbuild pack_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\wix_pack.binlog || exit /b
59
60 @popd
61 @endlocal
src/wix/wix.sln
-37
@@ -34,8 +34,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixnative", "wixnative\wixn
34 EndProject
35 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Native", "WixToolset.Core.Native\WixToolset.Core.Native.csproj", "{81533C6A-E145-4EB5-9658-3ACA8A2A6323}"
36 EndProject
37 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "heat\heat.csproj", "{E08BCE70-7D77-4B70-83F1-F08A7B58FC16}"
38 -EndProject
37 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "wix", "wix\wix.csproj", "{C933FB6B-074C-4ED2-B961-7639A7877B3A}"
38 EndProject
39 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BuildTasks", "WixToolset.BuildTasks\WixToolset.BuildTasks.csproj", "{D04EE8DF-85E5-42E5-B7B4-D064818F32C5}"
@@ -44,8 +42,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Sdk", "WixToolse
42 EndProject
43 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Sdk", "test\WixToolsetTest.Sdk\WixToolsetTest.Sdk.csproj", "{C44BB95F-5020-4876-933C-B73A24C488FD}"
44 EndProject
47 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Heat", "test\WixToolsetTest.Heat\WixToolsetTest.Heat.csproj", "{9D788104-2636-4E4C-891C-08FF05FEC31E}"
48 -EndProject
45 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Core.Native", "test\WixToolsetTest.Core.Native\WixToolsetTest.Core.Native.csproj", "{93645356-5D5F-45DE-AC7F-252D35E1ACE5}"
46 EndProject
47 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BuildTasks", "test\WixToolsetTest.BuildTasks\WixToolsetTest.BuildTasks.csproj", "{A05698E0-30D9-4B36-8F3B-585A99D67118}"
@@ -306,22 +302,6 @@ Global
302 {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x64.Build.0 = Release|Any CPU
303 {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x86.ActiveCfg = Release|Any CPU
304 {81533C6A-E145-4EB5-9658-3ACA8A2A6323}.Release|x86.Build.0 = Release|Any CPU
309 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
310 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|Any CPU.Build.0 = Debug|Any CPU
311 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|ARM64.ActiveCfg = Debug|Any CPU
312 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|ARM64.Build.0 = Debug|Any CPU
313 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x64.ActiveCfg = Debug|Any CPU
314 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x64.Build.0 = Debug|Any CPU
315 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x86.ActiveCfg = Debug|Any CPU
316 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Debug|x86.Build.0 = Debug|Any CPU
317 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|Any CPU.ActiveCfg = Release|Any CPU
318 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|Any CPU.Build.0 = Release|Any CPU
319 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|ARM64.ActiveCfg = Release|Any CPU
320 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|ARM64.Build.0 = Release|Any CPU
321 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x64.ActiveCfg = Release|Any CPU
322 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x64.Build.0 = Release|Any CPU
323 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x86.ActiveCfg = Release|Any CPU
324 - {E08BCE70-7D77-4B70-83F1-F08A7B58FC16}.Release|x86.Build.0 = Release|Any CPU
305 {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
306 {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|Any CPU.Build.0 = Debug|Any CPU
307 {C933FB6B-074C-4ED2-B961-7639A7877B3A}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@@ -386,22 +366,6 @@ Global
366 {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x64.Build.0 = Release|Any CPU
367 {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x86.ActiveCfg = Release|Any CPU
368 {C44BB95F-5020-4876-933C-B73A24C488FD}.Release|x86.Build.0 = Release|Any CPU
389 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
390 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|Any CPU.Build.0 = Debug|Any CPU
391 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|ARM64.ActiveCfg = Debug|Any CPU
392 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|ARM64.Build.0 = Debug|Any CPU
393 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x64.ActiveCfg = Debug|Any CPU
394 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x64.Build.0 = Debug|Any CPU
395 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x86.ActiveCfg = Debug|Any CPU
396 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Debug|x86.Build.0 = Debug|Any CPU
397 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|Any CPU.ActiveCfg = Release|Any CPU
398 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|Any CPU.Build.0 = Release|Any CPU
399 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|ARM64.ActiveCfg = Release|Any CPU
400 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|ARM64.Build.0 = Release|Any CPU
401 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x64.ActiveCfg = Release|Any CPU
402 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x64.Build.0 = Release|Any CPU
403 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x86.ActiveCfg = Release|Any CPU
404 - {9D788104-2636-4E4C-891C-08FF05FEC31E}.Release|x86.Build.0 = Release|Any CPU
369 {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
370 {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|Any CPU.Build.0 = Debug|Any CPU
371 {93645356-5D5F-45DE-AC7F-252D35E1ACE5}.Debug|ARM64.ActiveCfg = Debug|Any CPU
@@ -478,7 +442,6 @@ Global
442 {DF63F589-028E-45A1-A212-948FACF1FDCD} = {1284331E-BC6C-426D-AAAF-140C0174F875}
443 {23FC60D7-B101-42F8-9786-DB7A9CD964A2} = {1284331E-BC6C-426D-AAAF-140C0174F875}
444 {C44BB95F-5020-4876-933C-B73A24C488FD} = {1284331E-BC6C-426D-AAAF-140C0174F875}
481 - {9D788104-2636-4E4C-891C-08FF05FEC31E} = {1284331E-BC6C-426D-AAAF-140C0174F875}
445 {93645356-5D5F-45DE-AC7F-252D35E1ACE5} = {1284331E-BC6C-426D-AAAF-140C0174F875}
446 {A05698E0-30D9-4B36-8F3B-585A99D67118} = {1284331E-BC6C-426D-AAAF-140C0174F875}
447 {392817AE-4493-4BED-A7FD-2399379E1B1C} = {1284331E-BC6C-426D-AAAF-140C0174F875}