views:

23

answers:

2

I'm using CC.net on against a Source Safe database, and have a problem that someone deleted some files from the database, and the deleted files weren't removed. I didn't see a config switch or anything that I could set for it to clear the code directory prior to building.

Am I missing something?

A: 

As Alex says there is a CleanCopy flag in the source code block. However, my situation was a little different. I use subversion and I found the CleanCopy flag was NOT doing what it said it would on the box.

To solve the problem I added a task which runs a batch file that clears out the build's working copy prior to checkout. It is a bit slower (about 1 min for code base of 400Mb) but guarantees no old code.

Kindness,

Dan

Daniel Elliott
How does this work with the existing SourceControl Block? Where do I stick the executable block so that the it happens between the source control check for mods and the get?
JoelHess
I was unable to get it to happen between the check for mods and the get. I have cruise control set to only build on mods so I did prior to the SourceControl block.
Daniel Elliott
use the CleanCopy flag instead, why reinvent the wheel?
Alex
Explained the re-invention a little ... thanks Alex.
Daniel Elliott
A: 

All you need to do is set CleanCopy to true in your source control block. The documentation is very clear on this. The above answer is the wrong way.

Alex
If your buildserver is building an IIS hosted website (we have integration tests that require this) Some files can not be deleted by the CleanCopy flag. Hence, I went the way I did. I don't feel the answer is wrong but I agree with your point, I should have mentioned CleanCopy (which I have now done)
Daniel Elliott