In my msbuild script I have to clean a directory, which has some hidden readonly subdirectories. I was using the DeleteTree task, but it fails on these. What is the best way to delete a directory recursively regardless of file attributes?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I ended up simply executing rmdir with appropriate parameters. I still don’t understand why it is good practice to use msbuild, it just makes life more difficult.