I'm using Nant as the build tool on a CruiseControl.NET continuous integration server. Nant is deploying the code to a live Web directory (so that a working instance of the latest version of the code is always available for developers to hit). Approximately half the time, I get the following error:

 [copy] Copying 1 file to 'c:\WebSites\LmsDev\Web\log.config'.

Build Error: NAnt.Core.BuildException
Cannot copy 'c:\LmsSource\Web\logDev.config' to 'c:\WebSites\LmsDev\Web\log.config'.
in c:\lmssource\web\web.build line: 217 col: 7

   at NAnt.Core.Tasks.CopyTask.DoFileOperations()
   at NAnt.Core.Tasks.CopyTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Tasks.CallTask.ExecuteTask()
   at NAnt.Core.Task.Execute()
   at NAnt.Core.Target.Execute()
at NAnt.Core.Project.Execute(String targetName, Boolean forceDependencies)
   at NAnt.Core.Project.Execute()
   at NAnt.Core.Project.Run()


The actual file that this happens to is variable, but the log.config file (which is a log4net configuration file) is the one that shows up most often.

My suspicion is that the running web application is keeping these files open (log4net periodically checks the config file for modifications, for instance), so they can't be overwritten.

Does this sound correct? And if so, is there anything I can do to prevent it from happening?

--
Mike Kozlowski
http://www.klio.org/mlk/



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to