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
-
objectCommands
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
pathstring-p, The root path to start cleaning from. [Default: Current directory]
noRestorebool-n, If true, skips any restore operations. [Default: false]
verbosebool-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.