dotnet-clean - Man Page

Cleans the output of a project.

dotnet clean

This article applies to: ✔️ .NET Core 3.1 SDK and later versions

Synopsis

dotnet clean [<PROJECT>|<SOLUTION>] [-c|--configuration <CONFIGURATION>]
    [-f|--framework <FRAMEWORK>] [--interactive]
    [--nologo] [-o|--output <OUTPUT_DIRECTORY>]
    [-r|--runtime <RUNTIME_IDENTIFIER>] [-v|--verbosity <LEVEL>]

dotnet clean -h|--help

Description

The dotnet clean command cleans the output of the previous build. It’s implemented as an MSBuild target, so the project is evaluated when the command is run. Only the outputs created during the build are cleaned. Both intermediate (obj) and final output (bin) folders are cleaned.

Arguments

PROJECT | SOLUTION

The MSBuild project or solution to clean. If a project or solution file is not specified, MSBuild searches the current working directory for a file that has a file extension that ends in proj or sln, and uses that file.

Options

Examples

Info

2023-10-25 .NET Documentation