title: Delete sqlite database file in .net environment
body: <p>I'm doing some integration tests of a software which uses SQLite. </p>
  
  <p>The software needs to use a database file to prevent data being lost. After each of the tests, I want to delete the database file to leave everything as it was at the beginning. </p>
  
  <p>The problem is  that when I Try to delete the file It throws an exception which says "System.IO.IOException: The process cannot access the file '*****' because it is being used by another process". Before trying to delete the file, I'm closing and disposing of the connection like this:</p>
  
  <pre><code>if(_connection.State == System.Data.ConnectionState.Open) _connection.Close();
  _connection.Dispose();
  </code></pre>
  
  <p>To delete the file I am using the instruction: <code>File.Delete(_databaseFilePath);</code>
  What am I doing wrong?, Do I miss something?
  Thanks in advance.</p>