Merge pull request #5016 from nguerrera/workaround-msbuild-path-issue
Work around msbuild bug that blocks git tool tasks in VS2017 prompt
This commit is contained in:
commit
88ac88802b
2 changed files with 8 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using Microsoft.Build.Framework;
|
using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
|
@ -92,7 +93,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
return "git";
|
// Workaround: https://github.com/Microsoft/msbuild/issues/1215
|
||||||
|
// There's a "git" folder on the PATH in VS 2017 Developer command prompt and it causes msbuild to fail to execute git.
|
||||||
|
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "git.exe" : "git";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string GenerateCommandLineCommands()
|
protected override string GenerateCommandLineCommands()
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
using Microsoft.Build.Framework;
|
using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
|
||||||
namespace Microsoft.DotNet.Cli.Build
|
namespace Microsoft.DotNet.Cli.Build
|
||||||
{
|
{
|
||||||
|
@ -26,7 +27,9 @@ namespace Microsoft.DotNet.Cli.Build
|
||||||
|
|
||||||
protected override string GenerateFullPathToTool()
|
protected override string GenerateFullPathToTool()
|
||||||
{
|
{
|
||||||
return "git";
|
// Workaround: https://github.com/Microsoft/msbuild/issues/1215
|
||||||
|
// There's a "git" folder on the PATH in VS 2017 Developer command prompt and it causes msbuild to fail to execute git.
|
||||||
|
return RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "git.exe" : "git";
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string GenerateCommandLineCommands()
|
protected override string GenerateCommandLineCommands()
|
||||||
|
|
Loading…
Add table
Reference in a new issue