Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: dotnet within Emacs and the C# language server emits error #23076

Open
truboxl opened this issue Jan 31, 2025 · 0 comments
Open

[Bug]: dotnet within Emacs and the C# language server emits error #23076

truboxl opened this issue Jan 31, 2025 · 0 comments
Labels
bug report Something is not working properly dotnet .NET related stuff

Comments

@truboxl
Copy link
Contributor

truboxl commented Jan 31, 2025

I tried dotnet within Emacs and the C# language server emitted this error and failed to function:

LSP :: Error from the Language Server: System.AggregateException: One or more errors occurred. (The type initializer for 'Crypto' threw an exception.)
 ---> System.TypeInitializationException: The type initializer for 'Crypto' threw an exception.
 ---> System.DllNotFoundException: libSystem.Security.Cryptography.Native.OpenSsl
   at Interop.Crypto..cctor()
   --- End of inner exception stack trace ---

Even happened on a basic dotnet new console. In the stack trace it appeared to be using the library to hash text it was processing.

A workaround is:

LD_PRELOAD=$LD_PRELOAD:/data/data/com.termux/files/usr/lib/libssl.so emacs

After that the csharp-ls language server works. No idea why the workaround works- dunno why it didn't find the library.

EDIT: Of the language servers: csharp-ls now works for me. Omnisharp doesn't work with no error messages- studying now.

My Emacs LSP setup wizard downloaded the wrong omnisharp release- one for MS Windows requiring .NET Framework.

omnisharp-linux-arm64-net6.0 appears to be non-portable, with faster startup and larger footprint, but is glibc. Won't work.

omnisharp-linux-arm64 appears to be portable build. Doesn't work though... looks for mono and has an index out of bounds exception when selecting platform?- might be an error here from unexpected platform? Hmm...

Originally posted by @rene-descartes2021 in #516

Filing this in case I forgotten...

@truboxl truboxl added bug report Something is not working properly dotnet .NET related stuff labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly dotnet .NET related stuff
Projects
None yet
Development

No branches or pull requests

1 participant