Brian,
 
That issue was fixed since the 0.84 release. Try using a recent nightly build (http://nant.sourceforge.net/nightly/builds). ....
 
Gert
 
PS. I should consider putting that line in my signature ;-)


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: woensdag 17 november 2004 20:44
To: [EMAIL PROTECTED]
Subject: [Nant-users] Problem with Move task, overwrite doesn't work?

I'm having some trouble using the Move task under 0.84. I specify the move as overwrite="true", but when the file already exists in the destination, I get "Cannot create a file when that file already exists.".  Seems like setting the overwrite propery should have allowed me to overwrite the existing file. Any thoughts?
 
Build file:
<move file="ATBCRDevice/ATBCRDevice.dll" todir="." overwrite="true"/>
 
Verbose output:
ATBCRDevice.dll:
 
     [move] Moving C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice\ATBCRDevice.dl
l to C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice.dll.
 
BUILD FAILED
 
C:\Projects\o_add-ins\Source\ATBCR\ATBCR.build(10,4):
Failed to move C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice\ATBCRDevice.dll to
 C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice.dll.:
NAnt.Core.BuildException: C:\Projects\o_add-ins\Source\ATBCR\ATBCR.build(10,4):
Failed to move C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice\ATBCRDevice.dll to
 C:\Projects\o_add-ins\Source\ATBCR\ATBCRDevice.dll. ---> System.IO.IOException:
 Cannot create a file when that file already exists.
 
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.File.Move(String sourceFileName, String destFileName)
   at NAnt.Core.Tasks.MoveTask.DoFileOperations()
   --- End of inner exception stack trace ---
   at NAnt.Core.Tasks.MoveTask.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.Project.Execute()
   at NAnt.Core.Project.Run()
 

------------------------------------------------------------------------------->
Brian A. Rogers 
Senior Software Development Engineer
Biomedical Research Division
Platform Development Center, Indianapolis (SAGIAN)
Beckman Coulter, Inc.
(317) 808-4299

 

Reply via email to