csharp-ls.exe running is locking files and prevents build #4538

Open
opened 2026-02-16 17:44:31 -05:00 by yindo · 2 comments
Owner

Originally created by @vmachacek on GitHub (Jan 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Once I start open code and let it write anything seems like csharp-ls.exe is running even after open code is done locking dll files which in turn are locked for Rider to do a build

Plugins

No response

OpenCode version

latest

Steps to reproduce

  1. run open code and ask it to generate something.
    please note the issue is stemming from source generated code
  2. Build in Rider
  3. Rider cannot finish because it cannot access dll files

Screenshot and/or share link

No response

Operating System

windows

Terminal

powershell

Originally created by @vmachacek on GitHub (Jan 9, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Once I start open code and let it write anything seems like csharp-ls.exe is running even after open code is done locking dll files which in turn are locked for Rider to do a build ### Plugins _No response_ ### OpenCode version latest ### Steps to reproduce 1. run open code and ask it to generate something. please note the issue is stemming from source generated code 2. Build in Rider 3. Rider cannot finish because it cannot access dll files ### Screenshot and/or share link _No response_ ### Operating System windows ### Terminal powershell
yindo added the windowsbug labels 2026-02-16 17:44:31 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #1808: C# language server (csharp-ls) doesn't work

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 9, 2026): This issue might be a duplicate of existing issues. Please check: - #1808: C# language server (csharp-ls) doesn't work Feel free to ignore if none of these address your specific case.
Author
Owner

@lordfanger commented on GitHub (Jan 17, 2026):

I have the same problem and was able to fix it with a little hacks using Directory.Build.props file in the solution root folder.

Directory.Build.props

<Project>
  <PropertyGroup Condition="'$(OPENCODE)' == '1' AND '$(DOTNET_CLI_TELEMETRY_SESSIONID)' == ''">
    <BaseOutputPath>bin\opencode\</BaseOutputPath>
  </PropertyGroup>
</Project>
@lordfanger commented on GitHub (Jan 17, 2026): I have the same problem and was able to fix it with a little hacks using Directory.Build.props file in the solution root folder. `Directory.Build.props` ```xml <Project> <PropertyGroup Condition="'$(OPENCODE)' == '1' AND '$(DOTNET_CLI_TELEMETRY_SESSIONID)' == ''"> <BaseOutputPath>bin\opencode\</BaseOutputPath> </PropertyGroup> </Project> ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4538