Thursday, December 17, 2009

Using PowerShell to clean and zip a Solution folder

UK Application Development Consulting - PowerShell script to clean and zip a directory

“As part of my role I’m often sending sample code to customers. Sometimes this is a small snippet inline in an email, but often it will be a zipped up Visual Studio solution. Simply zipping up the folder as-is ends up including bin and obj directories which bloat the zip. Performing a clean in Visual Studio helps, but I ended up writing a PowerShell script to perform the directory clean. It turned out to be reasonably simply to put together:

image .”

I thought using Shell.Application to execute the zip an interesting approach and one I wanted to capture for future reference. That and the script itself, as I still find myself in the “Zip My Solution” game at times… ;)

 

Related Past Post XRef:
SolutionZipper - VS2005 Addin to Clean and Zip in One Step
MSBuild your way to ZIP Deliveries – Using MSBuild and MSBuild Community Tasks to zip your Build

No comments: