提交 8c49d85e 编写于 作者: A Ashley Hauck

Fix build issue

上级 1fb4d1e0
......@@ -32,16 +32,13 @@ public static DotnetHost CreateManagedToolInvocation(string toolName, string com
{
var pathToToolOpt = Utilities.GenerateFullPathToTool(toolName);
// Desktop executes tool directly, only prepend if we're on CLI
if (IsCliHost(out string pathToDotnet))
if (pathToToolOpt != null && IsCliHost(out string pathToDotnet))
{
if (pathToToolOpt != null)
{
commandLineArgs = PrependFileToArgs(pathToToolOpt, commandLineArgs);
pathToToolOpt = pathToDotnet;
}
commandLineArgs = PrependFileToArgs(pathToToolOpt, commandLineArgs);
pathToToolOpt = pathToDotnet;
}
return new DotnetHost(toolName, pathToToolOpt, commandLineArgs, isManagedTool: true);
return new DotnetHost(pathToToolOpt, commandLineArgs, isManagedTool: true);
}
private static bool IsCliHost(out string pathToDotnet)
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using System.Linq;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
......@@ -201,7 +202,7 @@ private DotnetHost DotnetHostInfo
{
// Explicitly provided ToolPath or ToolExe, don't try to
// figure anything out
_dotnetHostInfo = DotnetHost.CreateNativeToolInvocation(ToolName, Path.Combine(ToolPath, ToolExe), commandLine);
_dotnetHostInfo = DotnetHost.CreateNativeToolInvocation(Path.Combine(ToolPath, ToolExe), commandLine);
}
}
return _dotnetHostInfo;
......
......@@ -431,7 +431,7 @@ private DotnetHost DotnetHostInfo
{
// Explicitly provided ToolPath or ToolExe, don't try to
// figure anything out
_dotnetHostInfo = DotnetHost.CreateUnmanagedToolInvocation(ToolName, Path.Combine(ToolPath, ToolExe), commandLine);
_dotnetHostInfo = DotnetHost.CreateNativeToolInvocation(Path.Combine(ToolPath, ToolExe), commandLine);
}
}
return _dotnetHostInfo;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册