Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer


Cleans all intermediary files and output directories.

devenv /clean ConfigName [/project ProjName] [/projectconfig ConfigName] SolutionName


Required. The solution configuration to use.
Required. The path and name of the solution containing the project to clean.
/project ProjName
Optional. The project file name, as an absolute path or a relative path from the directory containing the solution file. You can also specify the project display name. Use this argument to build a single project within a solution with multiple projects.
/projectconfig ConfigName
Optional. The name of the build configuration.


  • Paths that include spaces must be enclosed in double quotation marks.
  • Summary information for clean operations appears in the Command Prompt window, the Solution Builder view of the Output window, and any log file specified by the /out argument.


This example cleans the solution MySolution for the release configuration.

devenv /clean release "c:\MySolutions\Visual Studio Projects\MySolution\MySolution.sln"

See Also

Devenv Command Line Switches | /build | /rebuild

© 2015 Microsoft