sebnilsson - dotnet-cleanup 0.6.0

.NET Core Global Tool for cleaning up solution, project or folder

PM> Install-Package dotnet-cleanup -Version 0.6.0 -Source https://www.myget.org/F/sebnilsson/api/v3/index.json

Copy to clipboard

> nuget.exe install dotnet-cleanup -Version 0.6.0 -Source https://www.myget.org/F/sebnilsson/api/v3/index.json

Copy to clipboard

> dotnet add package dotnet-cleanup --version 0.6.0 --source https://www.myget.org/F/sebnilsson/api/v3/index.json

Copy to clipboard
<PackageReference Include="dotnet-cleanup" Version="0.6.0" />
Copy to clipboard
source https://www.myget.org/F/sebnilsson/api/v3/index.json

nuget dotnet-cleanup  ~> 0.6.0
Copy to clipboard

> choco install dotnet-cleanup --version 0.6.0 --source https://www.myget.org/F/sebnilsson/api/v2

Copy to clipboard
Import-Module PowerShellGet
Register-PSRepository -Name "sebnilsson" -SourceLocation "https://www.myget.org/F/sebnilsson/api/v2"
Install-Module -Name "dotnet-cleanup" -RequiredVersion "0.6.0" -Repository "sebnilsson" 
Copy to clipboard

dotnet-cleanup

.NET Core Global Tool for cleaning up solution, project or folder.

The tool will list the files and folders which will be deleted, and you will be prompted to confirm. Can be disabled with the -y|--confirm-cleanup command-option.

Deleted files and folders are first moved to a temporary folder before deletion, so you can continue working with your projects, while the tool keeps cleaning up in background.

Installation

Download the .NET Core SDK 2.1 or later. The install the dotnet-cleanup .NET Global Tool, using the command-line:

dotnet tool install -g dotnet-cleanup

Usage

Usage: cleanup [arguments] [options]

Arguments:
  PATH                  Path to the solution-file, project-file or folder to clean. Defaults to current working directory.

Options:
  -p|--paths            Defines the paths to clean. Defaults to 'bin', 'obj' and 'node_modules'.
  -y|--confirm-cleanup  Confirm prompt for file cleanup automatically.
  -nd|--no-delete       Defines if files should be deleted, after confirmation.
  -nm|--no-move         Defines if files should be moved before deletion, after confirmation.
  -t|--temp-path        Directory in which the deleted items should be moved to before being cleaned up. Defaults to system Temp-folder.
  -v|--verbosity        Sets the verbosity level of the command. Allowed levels are Minimal, Normal, Detailed and Debug.
  -?|-h|--help          Show help information

The argument PATH can point to a specific .sln-file or a project-file (.csproj, .fsharp, .vbproj). If a .sln-file is specified, all its projects will be cleaned.

If it points to a folder, the folder will be scanned for a single solution-file and then for a single project-file. If multiple files are detected an error will be shown and you need to specify the file.

If not solution or project is found, the folder will be cleaned as a project.

Example

To cleanup a typical web-project, you can specify the paths to be cleaned in the projects like this:

cleanup -p "bin" -p "obj"  -p "artifacts" -p "npm_modules"
  • .NETCoreApp 2.1: 2.1.0.0

Owners

sebnilsson

Authors

Sebastian Nilsson

Project URL

https://github.com/sebnilsson/DotnetCleanup

License

MIT

Info

105 total downloads
23 downloads for version 0.6.0
Download (147.2 KB)
Found on the current feed only

Package history

Version Size Last updated Downloads Mirrored?
0.6.0 147.2 KB Thu, 18 Jul 2019 10:05:56 GMT 23
0.5.5 147.2 KB Thu, 18 Jul 2019 09:43:35 GMT 19
0.5.2 158.39 KB Tue, 23 Oct 2018 09:28:26 GMT 21
0.5.1 158.4 KB Mon, 22 Oct 2018 06:16:28 GMT 21
0.5.0 157.49 KB Wed, 17 Oct 2018 11:23:13 GMT 21