Summary
Installs multiple tools using the specified tool strings.
Syntax
[CakeMethodAlias]
[CakeNamespaceImport("Cake.Core.Packaging")]
public static (PackageReference Tool, FilePath[] Paths)[] InstallTools(this ICakeContext context, params string[] tools)
Examples
Task("Restore-Tools")
.Does(() =>
{
InstallTools(
"nuget:?package=xunit.runner.console&version=2.9.3",
"dotnet:?package=GitVersion.Tool&version=6.8.2");
});
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. |
| tools |
string[] |
The tool strings to install. |
Return Value
| Type |
Description |
| (PackageReference Tool, FilePath[] Paths)[] |
An array of tuples containing the package reference and installed file paths for each tool. |