Comments (6)
This happens all the time but I, too, do not like the idea of simply "ignoring" the error. I want to ensure that everything is deleted before doing a fresh build.
from nant.
The "nant deleting directory" issue is really an odd problem. The only way to make it working for me was to do the delete in an own target and calling that target separately:
<target name="clean">
<delete dir="${build.root}" if="${directory::exists(build.root)}" failonerror="true" />
</target>
Command line:
nant clean
nant build
hth, hfrmobile
from nant.
@hfrmobile That's what I'm doing but I still get the error randomly.
from nant.
Maybe I'll look into it more but it seems that the RecursiveDeleteDirectory
method should basically just call Directory.Delete(path, true)
. Seems like there's a lot of extra code in here.... https://github.com/nant/nant/blob/master/src/NAnt.Core/Tasks/DeleteTask.cs
from nant.
I know this is an old issue, but I still get these failures - the directory reported as "not empty" is always empty when I look at it after the error occurs, and the error can be thrown three or more times on successively higher directories in the tree that Nant is trying to delete as I repeatedly execute my "build clean" target.
Is anyone else still experiencing this problem? Is there a more recent ticket I should look at?
Thanks.
from nant.
I experienced the same problem. Using System.IO.Directory.Delete(path, true);
in a local build resolved the issue.
from nant.
Related Issues (20)
- About long path support HOT 2
- nant.sourceforge.net has been down for a while HOT 4
- makefile usage reasons HOT 1
- Mail Task doesn't play nicely with TryCatch Task HOT 2
- Licensing question HOT 3
- OnBuildSuccess vs. OnSuccessfulBuild in csproj files HOT 1
- <script> failed on mono 4.2 HOT 8
- System.OutOfMemoryException starting yesterday HOT 1
- It seems like nant does not support ".net framework 4.6.1" now. HOT 3
- Package new binary release on sourceforge to get bug fixes HOT 4
- Road Plan for nant project HOT 2
- Build failure on current master branch HOT 1
- Question: Any plan for .NET Core support?
- How to embed an application manifest using CSC task HOT 1
- exec program="java" fails if JDK7 & JDK8 are installed
- NAnt does not find .NET SDK 4.8 when compiling for .NET4.0
- <get /> fails on certain websites
- nant does not support ".net framework 4.8"
- Null pointer due to absent registry HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows on Windows 10 64bit HOT 6
- NAnt2 fork
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nant.