I had the same problem, but in my case, it was Windows Indexing Service that was keeping a handle on the file. You should get Handle.exe from sysinternals (http://technet.microsoft.com/en-us/ sysinternals/bb896655.aspx) it will tell you what is keeping the file open.
Christian On Jun 6, 6:34 am, "Craig & Sammi Sutherland" <[email protected]> wrote: > I've had quick look at this one. CC.NET just moves the file and then does > not do anything with it - so assuming there is not a bug in the File.Move() > method in .NET. Are you able to check if anything has locked the file (i.e. > it is not open in another application). > > I have added the try/catch block with the retry, although I don't think it > will have much of an affect. > > Craig > > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] On > > Behalf Of Ruben Willems > Sent: Saturday, 6 June 2009 8:22 p.m. > To: [email protected] > Subject: [ccnet-user] Re: package publisher Exception on locked file > > Hi > > probably the file is not completely closed yet, due to a system cache or so, > so a possible solution would be is to add a try catch around the copy > mechanism. > and retry after 3 seconds or so. and if this still fails, throw an error. > > http://jira.public.thoughtworks.org/browse/CCNET-1550 > > We'll look into it ... > > with kind regards > Ruben Willems > > On Fri, Jun 5, 2009 at 11:05 PM, > [email protected]<[email protected]> wrote: > > > I am using the package publisher and I keep getting exceptions every > > couple of builds. The last time it happened, I tried to manually > > remove the package and it was indeed locked. Any ideas on how to > > resolve? > > > version : 1.5.0.4316 > > > System.IO.IOException: The process cannot access the file 'D:\Sandbox > > \Artifacts\TEST.zip' because it is being used by another process. > > at System.IO.__Error.WinIOError(Int32 errorCode, String > > maybeFullPath) > > at System.IO.File.Delete(String path) > > at > > ThoughtWorks.CruiseControl.Core.Publishers.PackagePublisher.MoveFile > > (IIntegrationResult result, String tempFile) > > at ThoughtWorks.CruiseControl.Core.Publishers.PackagePublisher.Run > > (IIntegrationResult result) > > at ThoughtWorks.CruiseControl.Core.Project.RunTask(ITask task, > > IIntegrationResult result) > > at ThoughtWorks.CruiseControl.Core.Project.RunTasks > > (IIntegrationResult result, IList tasksToRun, Dictionary`2 > > parameterValues) > > at ThoughtWorks.CruiseControl.Core.Project.Run(IIntegrationResult > > result) > > at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build > > (IIntegrationResult result) > > at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate > > (IntegrationRequest request) > > Project: TEST > > > <package> > > <name>test</name> > > <compression>0</compression> > > <always>true</always> > > <flatten>true</flatten> > > <single>true</single> > > <baseDirectory>D:\BuildOutPut\Temp</baseDirectory> > > <manifest type="defaultManifestGenerator" /> > > <files> > > <file>TEST.GZIP</file> > > </files> > > </package>- Hide quoted text - > > - Show quoted text -
