Rider on Windows: OmniSharp read lock causes save failures and lost edits

Hello,

I am experiencing intermittent loss of source edits in Rider with SonarQube for IDE enabled. A Process Monitor capture identifies a file-sharing conflict between the plugin’s OmniSharp process and Rider while saving a C# source file.

Environment

  • OS: Windows 11, x64.
  • IDE: JetBrains Rider 2026.2.2, build RD-262.10315.191.
  • IDE runtime: JetBrains OpenJDK 25.0.4.
  • Plugin: SonarQube for IDE 12.9.0.85269, plugin ID org.sonarlint.idea.
  • Programming language: C#.
  • Sonar-provided OmniSharp distribution directory: omnisharp-net6\1.39.15.1-sonar.
  • .NET SDK selected in the OmniSharp command line: 10.0.401.
  • Rider’s backup-before-save / safe-write code path is active, as shown by the exception below.
  • Capture date: September 22, 2026.

Reproduction steps

  1. Open a C# solution in Rider with SonarQube for IDE enabled and its OmniSharp process running.
  2. Edit an existing .cs source file.
  3. Save and switch focus away from Rider, which can also trigger autosave.
  4. Continue normal editing and saving if the issue does not occur immediately.

This is intermittent and timing-dependent, not a deterministic failure on every save. A minimal public reproducer is not available yet.

Expected behavior

Background C# analysis should not prevent Rider from saving source files or put unsaved edits at risk.

Actual behavior

Changes appear to revert to the previous contents after saving, and a sibling Example.cs~ file remains.

Rider logs a save failure because another process is using the file.

After the captured failure, the .cs file and its .cs~ sibling had identical hashes; the sibling did not contain an additional version of the missing edits.

Process Monitor evidence

The following operations were recorded on the same source file.

The path and filename are anonymized. Process names, PIDs, timestamps, access flags, and results are from the actual capture.

File: C:\src\ExampleSolution\Example.cs

Time Process Operation Result Details
15:07:36.1620678 dotnet.exe, PID 21536 CreateFile SUCCESS Desired Access: Generic Read; Disposition: Open; ShareMode: Read
15:07:36.1632243 rider64.exe, PID 35796 CreateFile SHARING VIOLATION Desired Access: Generic Write, Read Attributes; Disposition: OpenIf; Options include Write Through; ShareMode: Read, Write, Delete
15:07:36.1634337 dotnet.exe, PID 21536 ReadFile SUCCESS Offset: 0; Length: 3,341 bytes
15:07:36.1635728 dotnet.exe, PID 21536 CloseFile SUCCESS The analyzer closes the source file

The analyzer opens the file with ShareMode: Read, which allows other readers but does not share write access. Rider’s write-open fails while that handle is open.

The interval between the analyzer’s open and close events is approximately 1.5 ms. This explains why checking for file users after the failure did not identify the process.

Identification of the blocking process

The process was identified through its executable, command line, creation time, and parent process:

rider64.exe (PID 35796)
  -> java.exe (PID 23484)
     org.sonarsource.sonarlint.core.backend.cli.SonarLintServerCli
       -> dotnet.exe (PID 21536)
          ...\sonarlint\storage\ondemand-plugins\
          omnisharp-net6\1.39.15.1-sonar\OmniSharp.dll

This is the Sonar-managed OmniSharp process, not Rider’s separate Roslyn worker.

Matching Rider exception

Anonymized excerpt from the error logged at 15:07:36:

java.io.IOException: Cannot save C:\src\ExampleSolution\Example.cs.
Unable to open the file for writing.
    at com.intellij.util.io.SafeFileOutputStream.openFile(SafeFileOutputStream.java:158)
    at com.intellij.util.io.SafeFileOutputStream.close(SafeFileOutputStream.java:130)
    ...
Caused by: java.nio.file.FileSystemException:
C:\src\ExampleSolution\Example.cs:
The process cannot access the file because it is being used by another process

An earlier failure on the same day was logged during Saving documents on frame deactivation.

Impact

Ordinary editing can result in unsuccessful saves and apparent loss of manual source changes. This affects the reliability of saving code, not just analysis results.

Additional context

The capture was made before trying the proposed workaround of disabling the plugin. That workaround has not yet been validated, and I have not verified a fixed plugin version.

Please investigate the source-reader sharing mode in the Sonar-managed OmniSharp integration and its interaction with Rider’s safe-write sequence.

The raw trace and full logs contain private project paths and are not being published. The excerpt above is anonymized and contains no application source code.

Thank you.