Is there any way I can clean a VS solution completely? By completely I mean not just removing the current output for the projects built by the Active configuration. I mean cleaning out all output and intermediate files, for all build configurations.
Even after I change build output paths, I want to delete the ouput from the previous output paths.
Example scenario: I check out a source tree and make a release build, then a debug build. Now I have \bin\Debug directories and bin\Release directories, as well as \obj directories. I then want to clean the output for both configurations.
Maybe Subversion is a better tool for this, e.g. delete everything that isn't under source control? Otherwise, I suppose a batch file that cleans out obj, bin and TestResults directories recursively could do it, and I could bind a VS menu item to this tool.
I'm using SVN 1.7 and VS 2012.
Has anyone already created such a tool using VS, SVN, PowerShell or a windows batch file?
Whenever I add a brand new solution to SVN, I ensure that I mark the bin\ and obj\ folders of each project as ignored before I commit. I do the same for the .suo file (personal preference). That way, when I need to clean up any intermediate and build outputs, I just TortoiseSVN -> SVN Clean up ... and check Delete ignored files and folders:

This article by Jeff Atwood influenced me. Relevant portion:
How long does it take for you to get a new team member working productively on your project? If the answer is more than one day, you have a problem.
I want to be able to check out a solution and have it build first time. I also want to be able to easily make my checkout "like new" which is why I use SVN Cleanup so much.
One caveat is that you will probably have to close down Visual Studio before performing an SVN Cleanup so that none of the files in your bin\ and obj\ folders have been locked by it.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With