Cleaning up Visual Studio files and folders

From time to time it is needed to completely delete the bin and obj folders to make a project build. There are also other automatically generated files and folders that Visual Studio create for us that I never even look at.

Get-ChildItem .\ -include bin,obj,bld,Backup,UpgradeReport_Files,Debug,Release,ipch -Recurse | foreach ($) { remove-item $_.fullname -Force -Recurse }

Ricky Bing at Microsoft have been writing ut a blog post with a nice Powershell script that is easy to copy / paste when needed.

Cleaning up Visual Studio project folders using PowerShell

Teis Lindemark

Read more posts by this author.