Use the Muxer path if available

Fixes #1848
This commit is contained in:
Pranav K 2017-12-22 09:25:52 -08:00
parent 63aceea121
commit 36ff269fef
1 changed files with 15 additions and 4 deletions

View File

@ -6,9 +6,10 @@ using System.Diagnostics;
using System.Threading;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
using Microsoft.Extensions.CommandLineUtils;
namespace Microsoft.AspNetCore.Razor.Tasks
{
{
public abstract class DotNetToolTask : ToolTask
{
public bool Debug { get; set; }
@ -25,8 +26,18 @@ namespace Microsoft.AspNetCore.Razor.Tasks
protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High;
// use PATH to find dotnet
protected override string GenerateFullPathToTool() => ToolExe;
protected override string GenerateFullPathToTool()
{
#if NETSTANDARD2_0
if (!string.IsNullOrEmpty(DotNetMuxer.MuxerPath))
{
return DotNetMuxer.MuxerPath;
}
#endif
// use PATH to find dotnet
return ToolExe;
}
protected override string GenerateCommandLineCommands()
{
@ -66,4 +77,4 @@ namespace Microsoft.AspNetCore.Razor.Tasks
}
}
}
}
}