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,6 +6,7 @@ using System.Diagnostics;
using System.Threading; using System.Threading;
using Microsoft.Build.Framework; using Microsoft.Build.Framework;
using Microsoft.Build.Utilities; using Microsoft.Build.Utilities;
using Microsoft.Extensions.CommandLineUtils;
namespace Microsoft.AspNetCore.Razor.Tasks namespace Microsoft.AspNetCore.Razor.Tasks
{ {
@ -25,8 +26,18 @@ namespace Microsoft.AspNetCore.Razor.Tasks
protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High; protected override MessageImportance StandardErrorLoggingImportance => MessageImportance.High;
// use PATH to find dotnet protected override string GenerateFullPathToTool()
protected override string GenerateFullPathToTool() => ToolExe; {
#if NETSTANDARD2_0
if (!string.IsNullOrEmpty(DotNetMuxer.MuxerPath))
{
return DotNetMuxer.MuxerPath;
}
#endif
// use PATH to find dotnet
return ToolExe;
}
protected override string GenerateCommandLineCommands() protected override string GenerateCommandLineCommands()
{ {