sublimelsp / LSP-OmniSharp

Convenience plugin to install/update OmniSharp for LSP
MIT License
20 stars 9 forks source link

Doesn't Support Top-Level Satements (.NET 6) #27

Closed j0of closed 1 month ago

j0of commented 1 year ago

I prefer to use .NET 6 when coding in C# so that I don't have to declare using System; or the main method, but I get an error whenever I don't. image

beautifulcoder commented 1 year ago

I can verify a .NET 6 project does not work either. So, the problem might be lack of net6.0 support in general.

beautifulcoder commented 1 year ago

On further inspection, net6 support works when you only have the .NET SDK installed. If you install both Framework, and .NET Core on Windows then only Framework seems to work with Omnisharp. My guess is this is an msbuild limitation.

deathaxe commented 1 month ago

Should be fixed by PR https://github.com/sublimelsp/LSP-OmniSharp/pull/40, which makes transition to latest .NET 6+ based OmniSharp binaries. They are required to deal with latest .NET projects.