In Visual Studio 2013, added this to the end of my .csproj file just before the </Project>
closing tag
<Target Name = "clean_folders" AfterTargets="Clean">
<Exec Command = "rd /S /Q obj" />
<Exec Command = "rd /S /Q bin" />
</Target>
At first it didn't appear to work but I noticed that Visual Studio (or R#, not sure) re-re-added DesignTimeResolveAssemblyReferencesInput.cache
to the obj folder and it also re-added the current \bin
folder (I have different builds in different subfolders under \bin
). It cleaned away everything else, including the 25 other build configs I have from imported .csproj files (yes, I know).
Be careful if you Batch Rebuild more than one config as it just wipes all previous efforts on each rebuild leaving you with only the last one. Whups.