Skip to content

Commit

Permalink
Ship TaskRunner in a subdirectory so that it can load MSBuild using M…
Browse files Browse the repository at this point in the history
…SBuildLocator

Otherwise it will pick up the MSBuild binaries that we ship with the main viewer app
  • Loading branch information
KirillOsenkov committed Oct 27, 2024
1 parent f30f0c6 commit 7c3b5e8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/StructuredLogViewer/Controls/BuildControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -856,14 +856,14 @@ private void Run(Task task, bool debug = false)
var targetFramework = GetTaskTargetFramework(task);
if (targetFramework == null || targetFramework.StartsWith(".NETFramework"))
{
var taskRunnerExe = Path.Combine(directory, "TaskRunner.exe");
var taskRunnerExe = Path.Combine(directory, "TaskRunner.x86", "TaskRunner.exe");
// for easier debugging
Environment.SetEnvironmentVariable("COMPLUS_ZapDisable", "1");
Process.Start(taskRunnerExe.QuoteIfNeeded(), arguments);
}
else
{
var taskRunnerDll = Path.Combine(directory, "TaskRunner.dll");
var taskRunnerDll = Path.Combine(directory, "TaskRunner.x86", "TaskRunner.dll");
Environment.SetEnvironmentVariable("DOTNET_ReadyToRun", "0");
Environment.SetEnvironmentVariable("DOTNET_TieredCompilation", "0");
Environment.SetEnvironmentVariable("DOTNET_TieredPGO", "0");
Expand Down
10 changes: 6 additions & 4 deletions src/StructuredLogViewer/MSBuildStructuredLogViewer.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
<file src="Microsoft.Build.dll" target="lib\net472" />
<file src="Microsoft.Build.Framework.dll" target="lib\net472" />
<file src="Microsoft.Build.Locator.dll" target="lib\net472" />
<file src="Microsoft.Build.Locator.dll" target="lib\net472\TaskRunner.x86" />
<file src="Microsoft.Build.Tasks.Core.dll" target="lib\net472" />
<file src="Microsoft.Build.Utilities.Core.dll" target="lib\net472" />
<file src="Microsoft.IO.Redist.dll" target="lib\net472" />
Expand All @@ -55,6 +56,7 @@
<file src="Splat.dll" target="lib\net472" />
<file src="Squirrel.dll" target="lib\net472" />
<file src="StructuredLogger.dll" target="lib\net472" />
<file src="StructuredLogger.dll" target="lib\net472\TaskRunner.x86" />
<file src="StructuredLogger.Utils.dll" target="lib\net472" />
<file src="StructuredLogViewer.Core.dll" target="lib\net472" />
<file src="StructuredLogViewer.exe" target="lib\net472" />
Expand All @@ -66,10 +68,10 @@
<file src="System.Runtime.CompilerServices.Unsafe.dll" target="lib\net472" />
<file src="System.Text.Json.dll" target="lib\net472" />
<file src="System.ValueTuple.dll" target="lib\net472" />
<file src="TaskRunner.exe" target="lib\net472" />
<file src="TaskRunner.exe.config" target="lib\net472" />
<file src="TaskRunner.dll" target="lib\net472" />
<file src="TaskRunner.runtimeconfig.json" target="lib\net472" />
<file src="TaskRunner.exe" target="lib\net472\TaskRunner.x86" />
<file src="TaskRunner.exe.config" target="lib\net472\TaskRunner.x86" />
<file src="TaskRunner.dll" target="lib\net472\TaskRunner.x86" />
<file src="TaskRunner.runtimeconfig.json" target="lib\net472\TaskRunner.x86" />
<file src="Microsoft.Msagl.WpfGraphControl.dll" target="lib\net472" />
<file src="..\..\..\..\docs\StructuredLogger.png" target="StructuredLogger.png" />
</files>
Expand Down

0 comments on commit 7c3b5e8

Please sign in to comment.