Hello, that will not work because NAnt write in the same time to that file. Please use the Artifact Cleanup Publisher[1] for this requirement.
Daniel [1] http://confluence.public.thoughtworks.org/display/CCNET/Artifact+Cleanup+Publisher Am 27.01.2010 04:02, schrieb Justin Daubenmire: > Hi Daniel, > > Sure, my process is simply to clear the artifacts folder of any prior > xml output files from all tools so that the folder is empty in > preparation for the new generation of the files. > > For example, delete nant-results.xml, msbuild-results.xml, > simian-results.xml, ncover-results.xml etc. > > So my process is like this... > > <Project> > ... > <labeller type="assemblyVersionLabeller"> > ... > <sourcecontrol type="svn" autoGetSource="true"> > ... > <tasks> > <NAnt> > // delete all previously generated xml files in preparation for new build > // this is where the error is raised > // also modify assembly.cs files to show current CCNetLabel > </NAnt> > <msbuild> > // compile .sln to pick up changes to code > </msbuild> > <nant> > // run NCover, NCoverExplorer, and other metric tools > // which newly generates the results xml files > // previously deleted > </nant> > ... > <publishers> > <merge> > // merge all result xml files > ... > </project> > > For now though, I've removed the delete operation in the first NAnt > task to avoid the error. > > /Justin > > ----- Original Message ----- From: "Daniel Nauck" > <[email protected]> > To: <[email protected]> > Sent: Tuesday, January 26, 2010 4:17 PM > Subject: Re: [ccnet-user] Re: error accessing file > > >> Hi, >> >> can you please explain where and why do you try to delete this file? >> >> Your configuration is also intresting. >> >> Thanks >> >> Daniel >> >> Justin Daubenmire schrieb: >>> Hey guys, >>> >>> I upgraded to CruiseControl.NET-1.5.6764.1-Setup.exe - which I think >>> is the latest nightly build. I still am having the problem not being >>> able to delete the below mentioned file. >>> >>> /Justin >>> >>> ----- Original Message ----- From: "Justin Daubenmire" >>> <[email protected]> >>> To: <[email protected]> >>> Sent: Tuesday, January 26, 2010 9:30 AM >>> Subject: error accessing file >>> >>> >>>> Hey guys, >>>> >>>> I am new to reporting bugs so sorry if this is not the correct >>>> process for reporting them. >>>> >>>> I am running CruiseControl.NET-1.5.0.6237-Setup.exe >>>> >>>> I am getting the following error: >>>> >>>> Cannot delete file 'C:\...\nant-results.xml'. >>>> The process cannot access the file 'C:\...\nant-results.xml' because >>>> it is being used by another process. >>>> >>>> In my ccnet.config file, in the tasks section, task 1 is an NAnt >>>> task that deletes the file. Task 2 is the msbuild task. >>>> >>>> Under cc.net v 1.4.2 this worked fine. >>>> >>>> /Justin >>> >
