Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
Cleans all intermediary files and output directories.
devenv SolutionName /Clean [Config [/Project ProjName [/ProjectConfig ProjConfigName]] [/Out OutputFilename]]
Required. The full path and name of the solution file.
Optional. The configuration (such as
Release) to clean the intermediary files for the solution named in SolutionName. If more than one solution platform is available, you must also specify the platform (for example,
Debug|Win32). If this argument is unspecified or an empty string (
""), the tool uses the solution's active configuration.
Optional. The path and name of a project file within the solution. You can enter the project's display name or a relative path from the SolutionName folder to the project file. You can also enter the full path and name of the project file.
Optional. The project's build configuration name (such as
Release) to be used when cleaning the
/Projectnamed. If more than one solution platform is available, you must also specify the platform (for example,
Debug|Win32). If this switch is specified, it overrides the Config argument.
Optional. The name of a file that you want to send the tool's output to. If the file already exists, the tool appends the output to the end of the file.
This switch does the same function as the Clean Solution menu command within the IDE.
Enclose strings that include spaces in double quotation marks.
Summary information when cleaning and building, including errors, can be displayed in the Command window, or in any log file specified with the /Out switch.
/Project switch isn't specified, the cleaning action is done on all projects in the solution, even if FileName was specified as a project file.
The first example cleans the
MySolution solution, using the default configuration specified in the solution file.
The second example cleans the project
CSharpWinApp, using the
Debug project build configuration within
devenv "%USERPROFILE%\source\repos\MySolution\MySolution.sln" /Clean devenv "%USERPROFILE%\source\repos\MySolution\MySolution.sln" /Clean "Debug" /project "CSharpWinApp\CSharpWinApp.csproj" /projectconfig "Debug"