Why disposing Utf8JsonWriter leaves file locked and how to fix it
Summary The Utf8JsonWriter you create with new(File.Create(…)) owns the underlying `FileStream, and disposing the writer does not close that stream. The file remains locked, so the subsequent File.OpenRead fails with “the process cannot access the file … because it is being used by another process.” The fix is to also dispose the FileStream (or use … Read more