Summary
Installs multiple tools using the specified package references.
Syntax
[CakeMethodAlias]
[CakeNamespaceImport("Cake.Core.Packaging")]
public static (PackageReference Tool, FilePath[] Paths)[] InstallTools(this ICakeContext context, params PackageReference[] tools)
Examples
Task("Restore-Tools")
.Does(() =>
{
InstallTools(
new PackageReference("nuget:?package=xunit.runner.console&version=2.9.3"),
new PackageReference("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 |
PackageReference[] |
The package references for the tools 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. |