I have deployed CruiseControl.Net (Version 1.6.7981.1) server and it does the following tasks:
- Build trigger
- Labeller
- VSTS Soursecontrol block (Get the soursecode from TFS 2010 server)
- Build the code in Debug mode
- Run NUnit test using Nanat task
- Merge NUnit-Result.xml (Publisher task)
As I need to clear NUnit-Result.xml file every time before running the NUnit task, I have added a delete task in Nant.build file which deletes NUnit-results.xml before NUnit task run.
Now my problem is when my build get triggers and if my TFS server is not accessible, build get failed and only publisher task runs so Old Nunit result file merge in the failed build.
I Tried running "Prebuild" task but it works only if TFS server is accessible.
Now What I want is a task to delete Nunit-result.xml which can run even if my TFS is not accessible (either before soursecontrol block or within/after publisher block)
Thanks in advance
You can add an exec task to delete the file in the publisers setion just before the file merge
Like this: