diff --git a/src/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cs b/src/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cs index db3b8de298..4c604f9fe6 100644 --- a/src/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cs +++ b/src/Cake.Common/Tools/DotNetCore/DotNetCoreAliases.cs @@ -1059,7 +1059,7 @@ public static void DotNetCoreVSTest(this ICakeContext context, IEnumerable /// The context. - /// The projects path. + /// The project path. /// The command to execute. /// /// @@ -1069,7 +1069,7 @@ public static void DotNetCoreVSTest(this ICakeContext context, IEnumerable /// Execute an .NET Core Extensibility Tool. /// /// The context. - /// The projects path. + /// The project path. /// The command to execute. /// The arguments. /// @@ -1107,6 +1105,33 @@ public static void DotNetCoreTool(this ICakeContext context, FilePath projectPat } var settings = new DotNetCoreToolSettings(); + + context.DotNetCoreTool(projectPath, command, arguments, settings); + } + + /// + /// Execute an .NET Core Extensibility Tool. + /// + /// The context. + /// The project path. + /// The command to execute. + /// The arguments. + /// The settings. + /// + /// + /// DotNetCoreTool("./src/project", "xunit", "-xml report.xml"); + /// + /// + [CakeMethodAlias] + [CakeAliasCategory("Tool")] + [CakeNamespaceImport("Cake.Common.Tools.DotNetCore.Tool")] + public static void DotNetCoreTool(this ICakeContext context, FilePath projectPath, string command, ProcessArgumentBuilder arguments, DotNetCoreToolSettings settings) + { + if (context == null) + { + throw new ArgumentNullException(nameof(context)); + } + var runner = new DotNetCoreToolRunner(context.FileSystem, context.Environment, context.ProcessRunner, context.Tools); runner.Execute(projectPath, command, arguments, settings);