I am having troubles writing to a CSV file, as VB.NET seems to think it is already in use by another app...

Here is a quick cut down version of the code:

VB Code:
  1. Dim di As New FileInfo("users.csv")
  2. If di.Length <> 0 Then
  3.   Dim userFile As New IO.StreamWriter("users.csv", True)
  4.   userFile.Write("here is some text, and here is more")
  5.   userFile.Close()
  6. End If

If required, I can post the entire chunk, but from what you see above, is there any reason why VB.NET will not write to users.csv?

Cheers.