I'm currently using TestDrive.NET 3.5 Beta Personal and on Teardown when I try to do a DirectoryInfo.Delete() with recursive = true, I keep getting a message that TestDriven is holding onto some of the files that the recursive delete would normally take care of.
Is there any way to get around this? I'm already doing a GC.Collect and a GC.WaitForPendingFinalizers to no avail.
D
Answer by
David Wardle
If you are using Windows XP, a delete operation on a file or directory could fail, you can try to get around this by inducing a garbage collection to remove the open handles.
I'm currently using TestDrive.NET 3.5 Beta Personal and on Teardown when I try to do a DirectoryInfo.Delete() with recursive = true, I keep getting a message that TestDriven is holding onto some of the files that the recursive delete would normally take care of.
Is there any way to get around this?
I'm already doing a GC.Collect and a GC.WaitForPendingFinalizers to no avail.
If you are using Windows XP, a delete operation on a file or directory could fail, you can try to get around this by inducing a garbage collection to remove the open handles.