CleanProject - Cleans Visual Studio Solutions For Uploading or Email

A handy utility you can use to remove bin, obj, test results and a lot of other goo from your solution folder and then zip it up so you can email to a friend or upload to a website like Code Gallery.

C# (776.1 KB)
 
 
 
 
 
5 Star
(1)
3,039 times
Add to favorites
10/20/2011
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • Is it working in Visual Studio 2013?
    1 Posts | Last post July 12, 2015
    • Hi Ron,
      
      nice project.
      
      How can I use this utility for Visual Studio 2013? In description I see that it supports only VS  2010.
      
      thanks.
      Marek
      
  • Good idea good job.But I like the following style
    1 Posts | Last post June 12, 2012
    • @echo off
      ATTRIB -H *.suo /S
      ATTRIB -H *.user /S
      Del *.user /S /Q
      Del *.suo /S /Q
      Del *.cache /S /Q
      Del *.Publish.xml /S /Q
      
      FOR /F "USEBACKQ DELIMS=," %%0 IN (`DIR /A:D /B/S`) DO IF EXIST "%%0\bin" RD /S /Q "%%0\bin"
      FOR /F "USEBACKQ DELIMS=," %%0 IN (`DIR /A:D /B/S`) DO IF EXIST "%%0\obj" RD /S /Q "%%0\obj"
      
  • Unhandled Exception
    2 Posts | Last post February 18, 2012
    • Just installed and tried this in VS2010 but got this error:
      
      Clean Project 1.2.1 - Cleans binaries, test results and other debris from your project
      Copying solution C:\temp\Hc\ to temporary directory
      Cleaning Solution Directory C:\Users\Johan.IRM\AppData\Local\Temp\Hc
      
      Unhandled Exception: System.Xml.XmlException: Data at the root level is invalid. Line 1, position 1.
         at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
         at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
         at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
         at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
         at System.Xml.Linq.XDocument.Load(String uri, LoadOptions options)
         at CleanProject.RemoveSourceControlBindings.CleanProjects()
         at CleanProject.SolutionCleaner.CleanDirectories(IEnumerable`1 directories)
         at CleanProject.Program.Main()
      
      Any idea?
    • Perhaps there is an invalid project file?  Looks like it loaded a file that it wants to convert (a .csproj or .vbproj) and it wasn't a valid XML file.
  • Shortening filename
    4 Posts | Last post August 22, 2011
    • Hello, I am using this tool all the time and I find it quite helpful. However, there is something that bothers me a little.  When used vie the context menu option it shortens the file name i.e. MS listview to RadTreeView becomes MSLIST~1 in the zipped file. Is there is a setting that I can change to overcome this behavior?
    • Strange - I've used it with long names and names with spaces but I'm not getting that behavior.
    • I guess it depends on the filename. Will try to get a scenario when this always happends. I am sorry it did not paste it right away.
    • It didn't take much. I have a folder called Grid virtual mode inside i have another folder called 259920 and 259920.sln file. In the 259920 folder i have the project files. Using the option to clean the file from the context menu creates a zip with the following name: GRIDVI~1.zip.
      
  • Integration With Build
    2 Posts | Last post August 02, 2011
    • Nice work Ron! I wanted to know if you have or know someone that has integrated this utility with TeamCity or some other build automation tool?
      
      Thanks
      Kyle
    • As a matter of fact I just added it to a build using Team Foundation Server.  All build systems provide a way to execute a process as a part of the build so you just have to invoke CleanProject from your build script.
  • Would this work for a sharepoint project?
    2 Posts | Last post July 25, 2011
    • Is there anything that would perclude you from using this as a "templating" method to deploy a SharePoint Solution including the complete deployment of a sharepoint site template? 
    • I don't know much about SharePoint so it's hard for me to say.  I suppose if you just wanted to clean stuff from the project prior to deploying it would probably work for you.  Let me know if you have trouble with it.