-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Open
Labels
needs-area-labelUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automaticallyUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
On Linux OS, after using SQlite Connection to connect to the database, then using File.Open, it does not report any error.
Expected Behavior
It should throw the error: The process cannot access the file '...Temp\tmp4ur3by.tmp' because it is being used by another process.
Steps To Reproduce
- Install the latest .NET 8.0.412 SDK on Linux Ubuntu Server 24.04 LTS machine
- Execute the code below:
File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.None)
- Execute the project
It does not report any error

The repro project project get from: https://github.com/jinzhao1127/UsageDatabase_CloseOpen.git
For windows side, it will throw eception:

Exceptions (if any)
No response
.NET Version
aapt@UBMark18001:~$ dotnet --info
.NET SDK:
Version: 8.0.412
Commit: 819e1a9566
Workload version: 8.0.400-manifests.9cf71931
MSBuild version: 17.11.31+933b72e36
Runtime Environment:
OS Name: ubuntu
OS Version: 24.04
OS Platform: Linux
RID: linux-x64
Base Path: /home/aapt/dotnet/sdk/8.0.412/
.NET workloads installed:
Configured to use loose manifests when installing new manifests.
There are no installed workloads to display.
Host:
Version: 8.0.18
Architecture: x64
Commit: ef853a7105
.NET SDKs installed:
8.0.412 [/home/aapt/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.18 [/home/aapt/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.18 [/home/aapt/dotnet/shared/Microsoft.NETCore.App]
Anything else?
No response
Metadata
Metadata
Assignees
Labels
needs-area-labelUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automaticallyUsed by the dotnet-issue-labeler to label those issues which couldn't be triaged automatically