- Posted by justin on September 27, 2007
I have had a problem for ages with when a build fails in CCNET is runs the file merge tasks that are part of my publishers to include the nunit test results. I finally got around to implementing something to delete those results xml files before the build runs. Originally I was just going to add it to nant but I found in the CCNET docs that there is now a prebuild section. One of the tasks included with the CCNET is an exec but it is not very clear on how to use CMD instead of creating a separate batch file. Luckily someone else figured this out at posted it to the mailing list @ http://groups.google.com.ag/group/ccnet-user/browse_thread/thread/d3f19074845bacf7/f58fa4bf7e221b3d?lnk=gst&q=prebuild+&rnum=9#f58fa4bf7e221b3d
Just in case the link goes away, below is how to do it.
<prebuild>
<exec>
<baseDirectory>C:\Temp</baseDirectory>
<executable>CMD</executable>
<buildArgs>/C RD "%ccnetworkingdirectory%" /S /Q</buildArgs>
</exec>
</prebuild>