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

Clarify use of C# extension without C# Dev Kit #6201

Open
PyrateAkananto opened this issue Aug 22, 2023 · 4 comments
Open

Clarify use of C# extension without C# Dev Kit #6201

PyrateAkananto opened this issue Aug 22, 2023 · 4 comments

Comments

@PyrateAkananto
Copy link

In addition to the clarification of the dependency direction mentioned in #6171 I would really appreciate if the description of the C# extension includes even more instructions.

While it is possible to use the C# extension as a standalone extension, we highly recommend using C# Dev Kit.

  1. Installing C# Dev Kit will automatically install this extension as a required dependency.
  2. ...
  3. ...

Please add another list of 1./2./3. instructions how to use this extension without C# Dev Kit!

I assume (but I am not sure) it would use OmniSharp instead, just like version 1 of the extension.

@dibarbet
Copy link
Member

It is totally possible to use the C# extension by itself. There are two possible modes that the C# extension runs in when devkit is not installed.

  1. Roslyn LSP mode - this is the new default in 2.x.
  2. O# mode (via the dotnet.server.useOmnisharp option)

We generally recommend using Roslyn LSP instead of O# mode and should generally work for most modern .net projects. There are a few known parity gaps between Roslyn LSP and O# (see #5736). If you're hitting any of those cases you'll have to switch to O# until we resolve those issues.

Assigning to @mikadumont to see if we need any doc updates.

@PyrateAkananto
Copy link
Author

As far as I understand it Roslyn LSP mode is provided by the C# Dev Kit extension. Unfortunately this extension is not open source with a permissive license but brings license terms which I, as an "enterprise" user, currently don't want to accept (because I would have to pay the full price of Visual Studio Professional 2022 to use Visual Studio Code plus C# Dev Kit).

In version 1 of the C# extension OmniSharp was installed by the extension. Is this still the case for version 2 of the C# extension? Or do I have to install OmniSharp myself somehow?

@claytonweaver
Copy link

You get the LSP mode with just the standalone C# extension, you don't need the dev kit extension. I use that for work everyday and it works just fine for me.

@juner
Copy link

juner commented Sep 21, 2023

source generator does not work if dotnet.server.useOmnisharp is not used. #6373

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants