diff options
author | Rob Mensching <rob@firegiant.com> | 2022-10-06 11:59:31 -0700 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2022-10-14 20:13:50 -0700 |
commit | 5567239a9411aac769a34f2c65b80a523a577ad7 (patch) | |
tree | 158d3689253cdf86f7f346672d1178d1742724ce /src/tools | |
parent | 8f8999f017c29d1cbe531d0fffbab1174c16596b (diff) | |
download | wix-5567239a9411aac769a34f2c65b80a523a577ad7.tar.gz wix-5567239a9411aac769a34f2c65b80a523a577ad7.tar.bz2 wix-5567239a9411aac769a34f2c65b80a523a577ad7.zip |
Run wix.exe out of proc
"wix build" will load assemblies to read metadata which can cause
the assemblies to get locked in the process. Since MSBuild keeps
build processes alive this can cause work done by in-proc MSBuild
tasks (like the WixBuild) to get stuck. Moving the "wix build" out
of proc avoids any of those issues.
Moving out of proc also allows the WiX tasks to be AnyCPU which
simplifies the wix.targets (although did need to add code to find
the .NET Framework wix.exe).
Fixes 6595
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj | 1 | ||||
-rw-r--r-- | src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj b/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj index ddc75c69..21fb419c 100644 --- a/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj +++ b/src/tools/WixToolset.HeatTasks/WixToolset.HeatTasks.csproj | |||
@@ -7,7 +7,6 @@ | |||
7 | <Title>WiX Toolset Heat MSBuild Tasks</Title> | 7 | <Title>WiX Toolset Heat MSBuild Tasks</Title> |
8 | <DebugType>embedded</DebugType> | 8 | <DebugType>embedded</DebugType> |
9 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | 9 | <PublishRepositoryUrl>true</PublishRepositoryUrl> |
10 | <!-- https://github.com/Microsoft/msbuild/issues/2360 --> | ||
11 | <PlatformTarget>AnyCPU</PlatformTarget> | 10 | <PlatformTarget>AnyCPU</PlatformTarget> |
12 | </PropertyGroup> | 11 | </PropertyGroup> |
13 | 12 | ||
diff --git a/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs index d54da457..a0a98578 100644 --- a/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs +++ b/src/tools/test/WixToolsetTest.HeatTasks/MsbuildHeatFixture.cs | |||
@@ -43,7 +43,7 @@ namespace WixToolsetTest.Sdk | |||
43 | }); | 43 | }); |
44 | result.AssertSuccess(); | 44 | result.AssertSuccess(); |
45 | 45 | ||
46 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); | 46 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem); |
47 | Assert.Single(heatCommandLines); | 47 | Assert.Single(heatCommandLines); |
48 | 48 | ||
49 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); | 49 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); |
@@ -99,7 +99,7 @@ namespace WixToolsetTest.Sdk | |||
99 | }); | 99 | }); |
100 | result.AssertSuccess(); | 100 | result.AssertSuccess(); |
101 | 101 | ||
102 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem, true); | 102 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "file", buildSystem); |
103 | Assert.Equal(2, heatCommandLines.Count()); | 103 | Assert.Equal(2, heatCommandLines.Count()); |
104 | 104 | ||
105 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); | 105 | var warnings = result.Output.Where(line => line.Contains(": warning")).ToArray(); |
@@ -185,7 +185,7 @@ namespace WixToolsetTest.Sdk | |||
185 | }); | 185 | }); |
186 | result.AssertSuccess(); | 186 | result.AssertSuccess(); |
187 | 187 | ||
188 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); | 188 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem); |
189 | var heatCommandLine = Assert.Single(heatCommandLines); | 189 | var heatCommandLine = Assert.Single(heatCommandLines); |
190 | 190 | ||
191 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) | 191 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) |
@@ -306,7 +306,7 @@ namespace WixToolsetTest.Sdk | |||
306 | }); | 306 | }); |
307 | result.AssertSuccess(); | 307 | result.AssertSuccess(); |
308 | 308 | ||
309 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem, true); | 309 | var heatCommandLines = MsbuildUtilities.GetToolCommandLines(result, "heat", "project", buildSystem); |
310 | var heatCommandLine = Assert.Single(heatCommandLines); | 310 | var heatCommandLine = Assert.Single(heatCommandLines); |
311 | 311 | ||
312 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) | 312 | if (useToolsVersion && buildSystem != BuildSystem.DotNetCoreSdk) |