Goto Home Page

Cleaning and Purging a Visual Studio Project Folder with Devenv

I have been working on the same Visual Studio project for over twelve months, and over that time the obj and bin sub-folders have become littered with temporary build files and different versions of the compiled .exe file.

As a result the project folder and all it’s sub-folders has grown to over 18Mb - as I work over a VPN, copying this project has become progressively slower, so I needed to clean and purge the unwanted files.

Visual Studio comes with a command line utility called devenv, which can be used with a clean switch, to purge your project folders of these unnecessary files. Using the commands below, the project was reduced to 3Mb - an 84% saving.

cd "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE
devenv /clean Debug c:\project\project.sln

About the author

Paul Bradley is a full time software developer, specialising in creating medical software for the national health service. He has been writing computer code since early 1990 and has developed web sites since April 2000.

This article was first published on 21.07.2010


© copyright 2004–2012
HomeContactColophonDisclaimer