ToolAliases.

InstallTool(ICakeContext, string) Method

Summary

Installs a tool using the specified tool string.
Namespace
Cake.Common.Tools
Containing Type
ToolAliases

Syntax

[CakeMethodAlias]
[CakeNamespaceImport("Cake.Core.Packaging")]
public static FilePath[] InstallTool(this ICakeContext context, string tool)

Examples

Task("Load-JMeter")
    .Does(() =>
{
    InstallTool("nuget:?package=JMeter&version=5.6.3");
});

Attributes

Type Description
CakeMethodAliasAttribute An attribute used to mark script method aliases.
CakeNamespaceImportAttribute An attribute used to hint Cake about additional namespaces that need to be imported for an alias to work. This attribute can mark an extension method, the extension method class, or the assembly to provide a global set of imports.

Parameters

Name Type Description
context ICakeContext The context.
tool string The tool string to install.

Return Value

Type Description
FilePath[] An array of file paths where the tool was installed.