DotNet aliases

Built-In

Contains functionality related to .NET CLI.

In order to use the commands for this alias, the .NET CLI tools will need to be installed on the machine where the Cake script is being executed. See this page for information on how to install.

Build

DotNetBuild(string, DotNetBuildSettings) Build all projects.
DotNetBuild(string) Build all projects.

Build Server

DotNetBuildServerShutdown(DotNetBuildServerShutdownSettings) Shuts down build servers that are started from dotnet.
DotNetBuildServerShutdown() Shuts down build servers that are started from dotnet.

Clean

DotNetClean(string, DotNetCleanSettings) Cleans a project's output.
DotNetClean(string) Cleans a project's output.

Execute

DotNetExecute(FilePath, ProcessArgumentBuilder, DotNetExecuteSettings) Execute an assembly with arguments in the specific path with settings.
DotNetExecute(FilePath, ProcessArgumentBuilder) Execute an assembly with arguments in the specific path.
DotNetExecute(FilePath) Execute an assembly.

Format

DotNetFormat(string, DotNetFormatSettings) Formats code to match editorconfig settings.
DotNetFormat(string) Formats code to match editorconfig settings.
DotNetFormatAnalyzers(string, DotNetFormatSettings) Format code to match editorconfig settings for analyzers.
DotNetFormatAnalyzers(string) Format code to match editorconfig settings for analyzers.
DotNetFormatStyle(string, DotNetFormatSettings) Format code to match editorconfig settings for code style.
DotNetFormatStyle(string) Format code to match editorconfig settings for code style.
DotNetFormatWhitespace(string, DotNetFormatSettings) Format code to match editorconfig settings for whitespace.
DotNetFormatWhitespace(string) Format code to match editorconfig settings for whitespace.

MSBuild

DotNetMSBuild(DotNetMSBuildSettings) Builds the specified targets in a project file found in the current working directory.
DotNetMSBuild(string, DotNetMSBuildSettings) Builds the specified targets in the project file.
DotNetMSBuild(string) Builds the specified targets in the project file.
DotNetMSBuild() Builds the specified targets in a project file found in the current working directory.

NuGet

DotNetNuGetAddSource(string, DotNetNuGetSourceSettings) Add the specified NuGet source.
DotNetNuGetDelete(DotNetNuGetDeleteSettings) Deletes a package from a server using the specified settings.
DotNetNuGetDelete(string, DotNetNuGetDeleteSettings) Deletes a package from a server.
DotNetNuGetDelete(string, string, DotNetNuGetDeleteSettings) Deletes a package from a server using the specified settings.
DotNetNuGetDelete(string, string) Deletes a specific version of a package from nuget.org.
DotNetNuGetDelete(string) Deletes a package from nuget.org.
DotNetNuGetDelete() Delete a NuGet Package from a server.
DotNetNuGetDisableSource(string, DotNetNuGetSourceSettings) Disable the specified NuGet source.
DotNetNuGetDisableSource(string) Disable the specified NuGet source.
DotNetNuGetEnableSource(string, DotNetNuGetSourceSettings) Enable the specified NuGet source.
DotNetNuGetEnableSource(string) Enable the specified NuGet source.
DotNetNuGetHasSource(string, DotNetNuGetSourceSettings) Determines whether the specified NuGet source exists.
DotNetNuGetHasSource(string) Determines whether the specified NuGet source exists.
DotNetNuGetPush(FilePath, DotNetNuGetPushSettings) Pushes one or more packages to a server using the specified settings.
DotNetNuGetPush(FilePath) Pushes one or more packages to a server.
DotNetNuGetRemoveSource(string, DotNetNuGetSourceSettings) Remove the specified NuGet source.
DotNetNuGetRemoveSource(string) Remove the specified NuGet source.
DotNetNuGetUpdateSource(string, DotNetNuGetSourceSettings) Update the specified NuGet source.

Pack

DotNetPack(string, DotNetPackSettings) Package all projects.
DotNetPack(string) Package all projects.

Package

DotNetAddPackage(string, DotNetPackageAddSettings) Adds or updates a package reference in a project file.
DotNetAddPackage(string, string, DotNetPackageAddSettings) Adds or updates a package reference in a project file.
DotNetAddPackage(string, string) Adds or updates a package reference in a project file.
DotNetAddPackage(string) Adds or updates a package reference in a project file.
DotNetRemovePackage(string, string) Removes package reference from a project file.
DotNetRemovePackage(string) Removes package reference from a project file.

Publish

DotNetPublish(string, DotNetPublishSettings) Publish all projects.
DotNetPublish(string) Publish all projects.

Restore

DotNetRestore(DotNetRestoreSettings) Restore all NuGet Packages with the settings.
DotNetRestore(string, DotNetRestoreSettings) Restore all NuGet Packages in the specified path with settings.
DotNetRestore(string) Restore all NuGet Packages in the specified path.
DotNetRestore() Restore all NuGet Packages.

Run

DotNetRun(string, DotNetRunSettings) Run project with settings.
DotNetRun(string, ProcessArgumentBuilder, DotNetRunSettings) Run project with settings.
DotNetRun(string, ProcessArgumentBuilder) Run project with path and arguments.
DotNetRun(string) Run project.
DotNetRun() Run all projects.

SDK

DotNetSDKCheck() Lists the latest available version of the .NET SDK and .NET Runtime.

Test

DotNetTest(string, DotNetTestSettings) Test project with settings.
DotNetTest(string, ProcessArgumentBuilder, DotNetTestSettings) Test project with settings.
DotNetTest(string) Test project with path.
DotNetTest() Test project.
DotNetVSTest(GlobPattern, DotNetVSTestSettings) Test one or more projects specified by a path or glob pattern with settings using the VS Test host runner.
DotNetVSTest(GlobPattern) Test one or more projects specified by a path or glob pattern using the VS Test host runner.
DotNetVSTest(IEnumerable<FilePath>, DotNetVSTestSettings) Test one or more specified projects with settings using the VS Test host runner.

Tool

DotNetTool(FilePath, string, ProcessArgumentBuilder, DotNetToolSettings) Execute an .NET Core Extensibility Tool.
DotNetTool(FilePath, string, ProcessArgumentBuilder) Execute an .NET Core Extensibility Tool.
DotNetTool(FilePath, string) Execute an .NET Core Extensibility Tool.
DotNetTool(string, DotNetToolSettings) Execute an .NET Core Extensibility Tool.
DotNetTool(string) Execute an .NET Core Extensibility Tool.

Workload

DotNetWorkloadInstall(IEnumerable<string>, DotNetWorkloadInstallSettings) Installs one or more optional workloads.
DotNetWorkloadInstall(IEnumerable<string>) Installs one or more optional workloads.
DotNetWorkloadInstall(string, DotNetWorkloadInstallSettings) Installs a specified optional workload.
DotNetWorkloadInstall(string) Installs a specified optional workload.
DotNetWorkloadList(DotNetWorkloadListSettings) Lists all installed workloads.
DotNetWorkloadList() Lists all installed workloads.
DotNetWorkloadRepair(DotNetWorkloadRepairSettings) Repairs all workloads installations.
DotNetWorkloadRepair() Repairs all workloads installations.
DotNetWorkloadRestore(string, DotNetWorkloadRestoreSettings) Installs workloads needed for a project or a solution.
DotNetWorkloadRestore(string) Installs workloads needed for a project or a solution.
DotNetWorkloadSearch(string, DotNetWorkloadSearchSettings) Lists available workloads by specifying all or part of the workload ID.
DotNetWorkloadSearch(string) Lists available workloads by specifying all or part of the workload ID.
DotNetWorkloadSearch() Lists available workloads.
DotNetWorkloadUninstall(IEnumerable<string>) Uninstalls one or more workloads.
DotNetWorkloadUninstall(string) Uninstalls a specified workload.
DotNetWorkloadUpdate(DotNetWorkloadUpdateSettings) Updates all installed workloads to the newest available version.
DotNetWorkloadUpdate() Updates all installed workloads to the newest available version.