You know those little tools you build to help in your development? The ones that you slapped together in a hurry and might not work all the time but you put up with them because you don’t want to take the time to fix them? Well CleanProject.exe is one of those tools that I’ve had for a long while. Years ago I think I shared an earlier version of it but when I mentioned this tool in an episode of AppFabric.tv I had some people ask if they could get the tool. I didn’t want to share it because it was far too fragile. It had numerous bugs and I didn’t want to take the time to fix it. Then I found that I needed to use CleanProject in the build for Microsoft.Activities.UnitTesting and so I did some work that I can now share with you.
First I created a command line parser I call CmdLine. I know the old joke is that everybody has to build a Command Line parser. There are many of them out there but I didn’t have one that worked just the way I wanted so I created one. You can use it by simply installing it with NuGet. Now that I had a solid command line parser the rest was easy.
Clean Project is a utility that cleans Visual Studio project directories so you can quickly upload or email a zip file with your solution.
How many times have you wanted to send a project to a friend or upload it to a web site like MSDN Code Gallery only to find that your zip file has lots of stuff that you don't need to send in it making the file larger than it needs to be.
You can also invoke CleanProject from Windows Explorer by right clicking on a folder.
Happy Coding!
Ron Jacobs http://www.ronjacobs.com Twitter: http://twitter.com/ronljacobs
Create a batch file with this in it:
del /s /ah /f *.suo
del /s /f *.user
del /s /f *.cache
del /s /f *.scc
del /s /f *.vssscc
del /s /f *.vspscc
del /s /ah StyleCop.Cache
rd /s /q bin obj TestResults
pause
Nice work! By the way, the guy who's suggesting all the deletes. That works just fine, but it's not as convenient.
Unless the development team is not using source control or, worst, source safe, I don't see why you need such tool.
Git has 'git clean'.
Mercurial has 'hg purge'.
And SVN has, through TortoiseSVN, the 'Delete unversioned files' menu.
I'm unaware of TFS. Maybe this tool is required for TFS.
Yes, there are many ways to accomplish these things. Perhaps through some combination of source control tools and batch files you could do the same thing. I needed this tool so I built it.
one of the programs that make everyday life easier
Very Nice. Thank you for sharing!