dotnet clean

dotnet clean --help

eg@debian:~$ dotnet clean --help
Description:
  .NET Clean Command

Usage:
  dotnet clean [<PROJECT | SOLUTION>...] [options]

Arguments:
  <PROJECT | SOLUTION>  The project or solution file to operate on. If a file is not specified, the command will search the current directory for one.

Options:
  -f, --framework <FRAMEWORK>          The target framework to clean for. The target framework must also be specified in the project file.
  -r, --runtime <RUNTIME_IDENTIFIER>   The target runtime to clean for.
  -c, --configuration <CONFIGURATION>  The configuration to clean for. The default for most projects is 'Debug'.
  --interactive                        Allows the command to stop and wait for user input or action (for example to complete authentication).
  -v, --verbosity <LEVEL>              Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].
  -o, --output <OUTPUT_DIR>            The directory containing the build artifacts to clean.
  --nologo                             Do not display the startup banner or the copyright message.
  -?, -h, --help                       Show command line help.

dotnet clean <project_file_path> --configuration <configuration_option>

eg@debian:~$ dotnet clean ./Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/ExampleSolution.ConsoleApp1.csproj --configuration Debug
MSBuild version 17.6.8+c70978d4d for .NET
Build started 8/24/2023 1:12:49PM.
     1>Project "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/ExampleSolution.ConsoleApp1.csproj" on node 1 (Clean target(s)).
     1>CoreClean:
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Debug/net7.0/ExampleSolution.ConsoleApp1".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Debug/net7.0/ExampleSolution.ConsoleApp1.deps.json".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Debug/net7.0/ExampleSolution.ConsoleApp1.runtimeconfig.json".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Debug/net7.0/ExampleSolution.ConsoleApp1.dll".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/bin/Debug/net7.0/ExampleSolution.ConsoleApp1.pdb".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.csproj.AssemblyReference.cache".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.GeneratedMSBuildEditorConfig.editorconfig".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.AssemblyInfoInputs.cache".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.AssemblyInfo.cs".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.csproj.CoreCompileInputs.cache".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.dll".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/refint/ExampleSolution.ConsoleApp1.dll".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.pdb".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ExampleSolution.ConsoleApp1.genruntimeconfig.cache".
         Deleting file "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/obj/Debug/net7.0/ref/ExampleSolution.ConsoleApp1.dll".
     1>Done Building Project "/home/eg/Data/DotnetCliExamples/ExampleSolution/ExampleSolution.ConsoleApp1/ExampleSolution.ConsoleApp1.csproj" (Clean target(s)).

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.27

Last updated