blog: New blogpost! "using c# in zed"

Signed-off-by: SindreKjelsrud <sindre@kjelsrud.dev>
This commit is contained in:
SindreKjelsrud 2025-09-21 12:45:44 +02:00
parent 34f7a0be13
commit 3faaa4f94f
Signed by: sidski
GPG key ID: D2BBDF3EDE6BA9A6

View file

@ -0,0 +1,39 @@
---
title: "using c# in zed"
pubDate: 'Sep 21 2025'
description: ""
draft: false
---
three weeks ago I decided to try out the [Zed IDE](https://zed.dev/) after hearing good stuff about it from friends and colleagues.
using it while working has been pretty nice so far, it feels super slick, but for some reason I've "struggled" a bit while coding in C#.
when I've got C# files open I've gotten the following error:
```bash
Language server error: omnisharp
oneshot canceled
-- stderr--
A fatal error occurred. The required library libhostfxr.dylib could not be found.
If this is a self-contained application, that library should exist in [/Users/sid/Library/Application Support/Zed/extensions/work/csharp/omnisharp-v1.39.13/].
If this is a framework-dependent application, install the runtime in the global location [/usr/local/share/dotnet/x64] or use the DOTNET_ROOT environment variable to specify the runtime location or register the runtime location in [/etc/dotnet/install_location].
The .NET runtime can be found at:
- https://aka.ms/dotnet-core-applaunch?missing_runtime=true&arch=arm64&rid=osx.11.4-arm64&apphost_version=6.0.0-preview.7.21317.1
```
after a while of troubleshooting and digging online I came across this [GitHub issue](https://github.com/zed-industries/zed/issues/8352) - which solved it for me!
In short, open up `/etc/dotnet/install_location` and change the value from `/usr/local/share/dotnet/x64` to `/usr/local/share/dotnet`. Additionally, there was another workaround which could be implemented within the Zed settings directly by adding the following:
```json
"env": {
"DOTNET_ROOT": "/usr/local/share/dotnet"
}
```
thanks to this fix I've now become a 10x developer (lol)
hope this helps someone, looks like [that's the theme I'm going for lately](/blog/finding-deleted-content-using-git-logs/).