SevenZipAliases Class

Summary

Functions to call 7-Zip.

In order to use this add-in, 7z.exe or 7za.exe has to be available. One option is using 7-Zip.CommandLine from nuget. The other option is to have 7z installed on your system (I.e. There is a registry-key HKLM/Software/7-Zip/Path that points to a directory containing 7z.exe or 7za.exe).

Supported formats and capabilities depend on your 7z-version.

To install add the following lines to your cake-file:

#tool "nuget:?package=7-Zip.CommandLine"
#addin "nuget:?package=Cake.7zip"

Assembly
Cake.7zip.dll
Namespace
Cake.SevenZip
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["SevenZipAliases"] class Type type-node

Syntax

public static class SevenZipAliases

Attributes

Type Description
NullableContextAttribute
NullableAttribute
CakeAliasCategoryAttribute

Methods

Name Value Summary
SevenZip(ICakeContext, Action<CommandBuilder>) void
Runs 7zip, using a fluent builder for configuration.

For more examples see the different builders for the ICommand.

static
SevenZip(ICakeContext, SevenZipSettings, Action<CommandBuilder>) void

Runs 7zip, using SevenZipSettings for configuration and additionally CommandBuilder for fluent configuration of the Command.

Works exactly like Cake.SevenZip.SevenZipAliases.SevenZip(Cake.Core.ICakeContext,System.Action{Cake.SevenZip.Builder.CommandBuilder}) However, the settings are supplied to set e.g. the ToolPath or something else.

DO NOT set Command on the SevenZipSettings, as it will be overwritten by the CommandBuilder.

static
SevenZip(ICakeContext, SevenZipSettings) void
Runs 7zip, using SevenZipSettings for configuration.
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin