A few weeks ago I have found on internet a batch script that helped me to clean an ASP.NET solution of .svn folders. It was great! It helped me a lot with a big ASP.NET solution that refused at one point to publish the files.
However after some consecutive publishes, I realized that I need to delete from solution more than just .svn files. I also have *.pdb, *.cs, .*csproj files and so on. So I searched a little bit on Google and learned how to edit that script and voila! I have made a version that can also delete from the publish folder the files and folders with the following extensions: *.cs,*.pdb,*.svn,*.csproj,*.suo,*.user,*.sln.
Anyways, the point is that you can add as many extensions as you want on the script.
Step 1) Download and unzip the archive from the bottom of this article;
Step 2) Double click to add the registry key to your Windows. You can choose the simplified version that deletes only the .svn folders or you can choose my version that deletes all the files with the above extensions .Don’t wory, you can edit those extensions very easy. Just open the file with notepad++ and you will see where to change it.
Step 3) Go to the folder where you have copied all you publish files. Right click on it and then select “Delete SVN Folders” or “Clean ASP.NET Solution”.
CAUTION: Please make sure that you don’t run this script on your working ASP.NET solution. The deletion of files is irreversible!
You can download the scripts from below.