dotnet-purge 0.0.12

dotnet tool install --global dotnet-purge --version 0.0.12                
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dotnet-purge --version 0.0.12                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dotnet-purge&version=0.0.12                
nuke :add-package dotnet-purge --version 0.0.12                

dotnet-purge

.NET tool that runs dotnet clean for each target framework and configuration and then deletes the output directories. Can be run in a directory containing a solution or project file.

Installation

dotnet tool install -g dotnet-purge

Usage

dotnet-purge [<TARGET>] [options]

Arguments

Name Description
<TARGET> The path of the solution or project to purge. If not specified, the current directory will be used.

Options

Name Description
-?, -h, --help Show help and usage information
--version Show version information
-r, --recurse Find projects in sub-directories and purge those too.
-n, --no-clean Don't run dotnet clean before deleting the output directories.
--vs Delete temporary files & directories created by Visual Studio, e.g. .vs, *.csproj.user.

Examples

Purge the solution/project in the current directory:

~/src/MyProject
$ dotnet purge
Found 1 project to purge

Running 'dotnet clean ./MyProject.csproj --configuration Debug --framework net8.0'... done!
Running 'dotnet clean ./MyProject.csproj --configuration Debug --framework net9.0'... done!
Running 'dotnet clean ./MyProject.csproj --configuration Release --framework net8.0'... done!
Running 'dotnet clean ./MyProject.csproj --configuration Release --framework net9.0'... done!
Deleted './obj/'
Deleted './bin/Debug'
Deleted './bin/'

Finished purging 1 project

Purge the solution/project in the specified directory:

~/src
$ dotnet purge ./MyProject
Found 1 project to purge

Running 'dotnet clean ./MyProject/MyProject.csproj --configuration Debug --framework net8.0'... done!
Running 'dotnet clean ./MyProject/MyProject.csproj  --configuration Debug --framework net9.0'... done!
Running 'dotnet clean ./MyProject/MyProject.csproj  --configuration Release --framework net8.0'... done!
Running 'dotnet clean ./MyProject/MyProject.csproj  --configuration Release --framework net9.0'... done!
Deleted './MyProject/obj/'
Deleted './MyProject/bin/Debug'
Deleted './MyProject/bin/'
(1/2) Purged ./MyProject/MyProject.csproj

Finished purging 1 project

Purge the specified solution:

~/src
$ dotnet purge ./MySolution/MySolution.slnx --vs
Found 2 projects to purge

Running 'dotnet clean ./MySolution/MyProject/MyProject.csproj --configuration Debug --framework net8.0'... done!
Running 'dotnet clean ./MySolution/MyProject/MyProject.csproj --configuration Debug --framework net9.0'... done!
Running 'dotnet clean ./MySolution/MyProject/MyProject.csproj --configuration Release --framework net8.0'... done!
Running 'dotnet clean ./MySolution/MyProject/MyProject.csproj --configuration Release --framework net9.0'... done!
Deleted './MySolution/MyProject/obj/'
Deleted './MySolution/MyProject/bin/Debug'
Deleted './MySolution/MyProject/bin/'
Deleted './MySolution/MyProject/.vs'
Deleted './MySolution/MyProject/MyProject.csproj.user'
(1/2) Purged ./MySolution/MyProject/MyProject.csproj
Running 'dotnet clean ./MySolution/MyLibrary/MyLibrary.csproj --configuration Debug --framework net8.0'... done!
Running 'dotnet clean ./MySolution/MyLibrary/MyLibrary.csproj --configuration Release --framework net8.0'... done!
Deleted './MySolution/MyLibrary/obj/'
Deleted './MySolution/MyLibrary/bin/Debug'
Deleted './MySolution/MyLibrary/bin/'
Deleted './MySolution/MyLibrary/.vs'
(2/2) Purged ./MySolution/MyLibrary/MyLibrary.csproj

Finished purging 2 projects

Add to Windows Explorer

Use context-menu.reg to add dotnet-purge to the Windows Explorer context menu.

context-menu.reg contents:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Shell]
@="none"
[HKEY_CLASSES_ROOT\Directory\shell\dotnet-purge]
"MUIVerb"="run dotnet-purge"
"Position"="bottom"
[HKEY_CLASSES_ROOT\Directory\Background\shell\dotnet-purge]
"MUIVerb"="run dotnet-purge"
"Position"="bottom"
[HKEY_CLASSES_ROOT\Directory\shell\dotnet-purge\command]
@="cmd.exe /c cd \"%V\" & dotnet-purge"
[HKEY_CLASSES_ROOT\Directory\Background\shell\dotnet-purge\command]
@="cmd.exe /c cd \"%V\" & dotnet-purge"
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.0.12 27 21 hours ago
0.0.11 210 7 days ago
0.0.10 209 8 days ago
0.0.9 167 8 days ago
0.0.8 136 9 days ago
0.0.7 118 9 days ago
0.0.6 112 9 days ago
0.0.5 114 9 days ago
0.0.4 248 11 days ago
0.0.3 191 11 days ago
0.0.3-pre 198 11 days ago
0.0.2-pre 193 11 days ago
0.0.1-pre 184 12 days ago