In vs2010, there is a vb.net project, I need to clean a folder before use it,
what I did is remote the folder, then create it again.
but the problem is ,it is removed but not created again.
I think maybe .net did some optimization. So how can I fix that?
Here is the code:
' delete folder
If IO.Directory.Exists(exportBaseFolder) = True Then
IO.Directory.Delete(exportBaseFolder, True)
End If
' create folder
IO.Directory.CreateDirectory(exportBaseFolder)