Hi guys.
I've been having the same problem and the following method worked for me.
I know is not a professional behavior but have in mind that we are affording a non solved bug, so anything that works can help. I code in VB.net and this trick does the job for me:
3:
Try
If My.Computer.FileSystem.DirectoryExists("My directory path") = True Then 'check if directory exists (or file with FileExists)
My.Computer.FileSystem.DeleteDirectory("My directory path", _
FileIO.UIOption.OnlyErrorDialogs, _
FileIO.RecycleOption.SendToRecycleBin) 'try to eliminate
End If
Catch 'in case of error
Application.DoEvents() 'let the OS work
Thread.Sleep(100) 'wait 100 ms
GoTo 3 'try again
End Try
I used in a VirtualBox with Windows 8 x64 installed (with very low RAM)
I haven't count the times that must try, but in a slow machine seems to have no delay.
I hope it helps.