Skip to content

Conversation

@oksanatk
Copy link
Contributor

previous version throwing error:
System.IO.IOException: 'The process cannot access the file because it is being used by another process.'

on line 82:
File.Delete("hello.db");

with SQLite version 3.47.0 and dotnet version 8.0.401

adding
SqliteConnection.ClearAllPools();
in the line before deleting the file seems to close background connections and release the file to be deleted.

previous version throwing error:
System.IO.IOException: 'The process cannot access the file because it is being used by another process.'
with SQLite version 3.47.0 and dotnet version 8.0.401

on line 82:
  File.Delete("hello.db");

adding 
SqliteConnection.ClearAllPools(); 
before deleting the file seems to close background connections and release the file to be deleted.
@oksanatk oksanatk requested a review from a team as a code owner November 24, 2024 20:42
@dotnetrepoman dotnetrepoman bot added this to the November 2024 milestone Nov 24, 2024
@dotnet-policy-service dotnet-policy-service bot added the community-contribution Indicates PR is created by someone from the .NET community. label Nov 24, 2024
@adegeo
Copy link
Contributor

adegeo commented Nov 26, 2024

Verified the fix. Thanks a bunch!

@sam951013
Copy link
Contributor

sam951013 commented Dec 23, 2024

@adegeo Can you merge this PR? If this PR is ready to merge.

@gewarren gewarren merged commit 38c5145 into dotnet:main Dec 23, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Indicates PR is created by someone from the .NET community. dotnet-data/svc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants