views:

1180

answers:

4

If you right click on a folder, you will see a "Clean" menu item. I assumed this would clean (remove) the obj and bin directory. However, as far as I can see, it does nothing. Is there another way? (please don't tell me to go to Windows Explorer or the cmd.exe) I'd like to remove the obj and bin folder so that I can easily zip the whole thing.

A: 

It doesn't remove the folders, but it does remove the build by-products. Is there any reason you want the actual build folders removed?

Christopher
I'd like to remove everything that's not necessary to compilation so that I can zip it and send it. Having .exes in zip files can be a problem for anti viruses.
tom7
Yes. But as I said, the build _products_ are removed. That means the .obj and .exe files. Just not the actual folders.
Christopher
+1  A: 

This little utility might be want you want.

It also deletes *.suo and *.user files and produces a report of all the files and folders that couldn't be deleted for any reason

Joe
That sounds like it will do the trick.
RichardOD
+2  A: 

Clean will remove all intermediate and final files created by the build process, such as .obj files and .exe or .dll files.

It does not, however, remove the directories where those files get built. I don't see a compelling reason why you need the directories to be removed. Can you explain further?

If you look inside these directories before and after a "Clean", you should see your compiled output get cleaned up.

abelenky
I want to remove bin and obj directories in order to zip everything.
tom7
"Clean" does not remove the .exe.
tom7
Just tried it with my Visual Studio 2005, and I can verify that "Clean" did remove the .exe (and all other files).
abelenky
A: 

I'm looking to delete the folders under the bin too. The reason that I'm interested is that Resharper puts the MSTest TestResults folder under the bin directory so my bin grows quite quickly.