tags:

views:

26

answers:

4

I'm sure this must have been asked before, but I can't seem to come up with the correct search to find what i'm looking for.

I'm a .net Developer, and even though we use a version control system, i often find myself wanting to zip a .net solution directory tree, and want a utility to delete all the temp files that can be rebuilt from the source code, such as objs, pdb's and what not.

Surely someone must have already written such a simple utility :)

thanks in advance

jonathan

+1  A: 

How about cleaning your solution? Would that suffice?

From the Visual Studio menu choose

Build -> Clean Solution

In case your SCM system is SVN, you can use SVN's export command to generate a clean folder structure of your project. Other source control management systems usually have similar commands or offer you to keep a "shadow" folder of your project.

0xA3
Yes, i tried that, but it still leaves tons of extra garbage around (at least on my machine).
Jonathan
A: 

I use a dos .bat file in the solution folder, that simply removes .exe, .dll and pdb files (and I have a more complex one for Win32 C++ projects).

DEL *.DLL /S
DEL *.EXE /S
DEL *.PDB /S

Alternatively, you can clean the solution from VS.

Mau
But be careful not to delete any externally referenced .dll files in your project ;-)
0xA3
I have a solution with 13 projects, and for some reason, the clean solution leaves behind tons of binaries i dont't want to back up.
Jonathan
A: 

Another option, if you are using Subversion as your source control system, is to use "export" to export your working directory to another folder (also available in TortoiseSVN).

This copies over just the items under source control, giving you a nice clean copy of your source tree including any uncommited changes, but excluding all the bin, obj and other directories and files.

Rob Levine
we use starteam, and i could something similar with that... but i still have a need to traverse a directory structure outside of VS and delete objs and what not. I guess it shouldnt' take long to write one, i just thought there must already be one. Thanks
Jonathan
@Jonathan - If you have to clean up outside source control, then it seems to me you are including extra/unneeded files in the source control.
Nelson
A: 

Ah.. i found what i was looking for. Its great!

http://code.google.com/p/treetrim/

Jonathan