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.
- CodePlex Download CleanProject v1.1.0
- Visual Studio Gallery CleanProject
- MSDN Code Samples (source download) CleanProject
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.
- bin folder
- obj folder
- TestResults folder
- Resharper folders
And then if you forget about removing Source Control bindings whoever gets your project will be prompted with errors about Source Control.
With Clean Project, I simply run it and get a nice clean folder or zip file that I can share without any of these issues. For more see What Files and Folders Does Clean Project Remove?
Email A Solution
Suppose I want to email a solution to my friend Sam. I’ve installed Clean Project and I’ve already got the solution open in Visual Studio.
- Select Tools / Clean, Remove Source Bindings and Zip Solution
- Attach the zip file and send the email
Windows Shell Folder Command
You can also invoke CleanProject from Windows Explorer by right clicking on a folder.
How Do I
How do I Install Clean Project?
How do I run Clean Project From the Command Line?
How do I run Clean Project From Visual Studio?
How do I run Clean Project from Windows Explorer?
How do I report a bug or suggestion?