Skip to content

Use absolute paths for dotnet launched DLLs#89

Merged
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
FelixDamrau:fix-cs-langu-srv
Jun 12, 2026
Merged

Use absolute paths for dotnet launched DLLs#89
MrSubidubi merged 1 commit into
zed-extensions:mainfrom
FelixDamrau:fix-cs-langu-srv

Conversation

@FelixDamrau

Copy link
Copy Markdown
Contributor

resolves #88

Zed spawns dotnet with its working directory set to the worktree root.
We must use absolute paths to reference the cs-language server, so the extension installed one can be found.

@cla-bot

cla-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @FelixDamrau on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@FelixDamrau

Copy link
Copy Markdown
Contributor Author

info

Only affects systems that do not have cs-language server installed as a global tool.
Guess that's why it wasn't found before/during development.
@rbstp -> Can you confirm that?

Same problem is in roslyn.rs, but this usually doesn't start DLLs

@FelixDamrau

Copy link
Copy Markdown
Contributor Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label Jun 6, 2026
@cla-bot

cla-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@FelixDamrau FelixDamrau mentioned this pull request Jun 6, 2026
@rbstp

rbstp commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

@FelixDamrau Turns out I've got csharp-ls installed as a global dotnet tool, so worktree.which("csharp-ls") finds it and short-circuits before we ever reach the dotnet exec path. That's why this never showed up while I was working on it.

I went back and reproduced the failure using the relative DLL path from a cwd outside the extension, and confirmed that the absolute path resolves it fine.

zed-zippy Bot added a commit to zed-industries/zed that referenced this pull request Jun 10, 2026
)

Cherry-pick of #59028 to preview

----
I was chatting with somebody today and they told me Zed is terrible
because it [only supports OmniSharp for C# as per the marketing
site](https://zed.dev/languages/csharp) which I knew 100% to be false.
While looking to do a quick fix for that, I realized the Zed marketing
website code is not part of this repo (as [confirmed by a quick

search](https://github.com/search?q=repo%3Azed-industries%2Fzed+LINQ+expressions&type=code))
but that [Zed C# docs](https://zed.dev/docs/languages/csharp) are part
of the repo and they too don't include the changes from
zed-extensions/csharp#77. Here's a quick update
for that!

I did test that `csharp-ls` actually receives the [extra

settings](https://github.com/razzmatazz/csharp-language-server#configuration)
by setting `"razorSupport": true` and confirming that with the LSP logs.

**Note**: I'd wait for zed-extensions/csharp#89
to be merged before merging this PR.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards

([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and

[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

Co-authored-by: Vlad Ionescu <Vlaaaaaaad@users.noreply.github.com>
zed-zippy Bot added a commit to zed-industries/zed that referenced this pull request Jun 10, 2026
Cherry-pick of #59028 to stable

----
I was chatting with somebody today and they told me Zed is terrible
because it [only supports OmniSharp for C# as per the marketing
site](https://zed.dev/languages/csharp) which I knew 100% to be false.
While looking to do a quick fix for that, I realized the Zed marketing
website code is not part of this repo (as [confirmed by a quick

search](https://github.com/search?q=repo%3Azed-industries%2Fzed+LINQ+expressions&type=code))
but that [Zed C# docs](https://zed.dev/docs/languages/csharp) are part
of the repo and they too don't include the changes from
zed-extensions/csharp#77. Here's a quick update
for that!

I did test that `csharp-ls` actually receives the [extra

settings](https://github.com/razzmatazz/csharp-language-server#configuration)
by setting `"razorSupport": true` and confirming that with the LSP logs.

**Note**: I'd wait for zed-extensions/csharp#89
to be merged before merging this PR.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards

([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and

[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

Co-authored-by: Vlad Ionescu <Vlaaaaaaad@users.noreply.github.com>
pull Bot pushed a commit to esinanturan/zed that referenced this pull request Jun 10, 2026
I was chatting with somebody today and they told me Zed is terrible
because it [only supports OmniSharp for C# as per the marketing
site](https://zed.dev/languages/csharp) which I knew 100% to be false.
While looking to do a quick fix for that, I realized the Zed marketing
website code is not part of this repo (as [confirmed by a quick
search](https://github.com/search?q=repo%3Azed-industries%2Fzed+LINQ+expressions&type=code))
but that [Zed C# docs](https://zed.dev/docs/languages/csharp) are part
of the repo and they too don't include the changes from
zed-extensions/csharp#77. Here's a quick update
for that!

I did test that `csharp-ls` actually receives the [extra
settings](https://github.com/razzmatazz/csharp-language-server#configuration)
by setting `"razorSupport": true` and confirming that with the LSP logs.

**Note**: I'd wait for zed-extensions/csharp#89
to be merged before merging this PR.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

@MrSubidubi MrSubidubi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also looks good to me. Thanks for jumping on this and the nice fix! Also, congratulations to your first contribution! 🎉

@MrSubidubi MrSubidubi merged commit 5d65437 into zed-extensions:main Jun 12, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot start csharp-ls

3 participants