Table of Contents

Class Commands

Namespace
Invex.Tools.ArtifactClean
Assembly
Invex.Tools.ArtifactClean.dll

The artclean command set registered with ConsoleAppFramework, which cleans a .NET workspace by running dotnet clean, deleting every bin and obj directory, and optionally running dotnet restore.

public sealed class Commands
Inheritance
object
Commands

Methods

Clean(string?, bool, bool)

Runs 'dotnet clean', then recursively deletes 'bin' and 'obj' directories from the specified path, then optionally restores the project.

[PublicAPI]
[SuppressMessage("Performance", "CA1822:Mark members as static", Justification = "Required by ConsoleAppFramework")]
public int Clean(string? path = null, bool noRestore = false, bool verbose = false)

Parameters

path string

-p, The root path to start cleaning from. [Default: Current directory]

noRestore bool

-n, If true, skips any restore operations. [Default: false]

verbose bool

-v, If true, outputs detailed information about the cleaning process. [Default: false]

Returns

int

0 on success; 1 if the path is invalid, 'dotnet clean' or 'dotnet restore' fails, or a 'bin' / 'obj' directory could not be deleted.