Skip to content

dotnet/vscode-csharp

Folders and files

NameName
Last commit message
Last commit date
Sep 27, 2024
Sep 6, 2024
Oct 23, 2024
Nov 7, 2024
Apr 27, 2018
Sep 7, 2024
Nov 13, 2024
Oct 29, 2024
Jun 13, 2023
Nov 8, 2024
Aug 4, 2023
Sep 4, 2024
May 13, 2022
Feb 12, 2024
Nov 13, 2024
Nov 7, 2024
Nov 7, 2024
Mar 29, 2024
Apr 20, 2021
Oct 18, 2022
Sep 24, 2024
Jul 15, 2024
Sep 4, 2024
Oct 17, 2022
Mar 25, 2024
Jun 27, 2023
Jun 27, 2023
Sep 16, 2024
Nov 13, 2024
Jun 13, 2023
Nov 7, 2024
Sep 4, 2024
Mar 29, 2020
Sep 4, 2024
Nov 1, 2023
Oct 29, 2024
Jan 10, 2017
Nov 13, 2024
Nov 13, 2024
Aug 29, 2023
Apr 9, 2018
Dec 4, 2023
Dec 4, 2023
Sep 4, 2024
Sep 4, 2024
Sep 16, 2024
Oct 29, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 11, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Nov 13, 2024
Dec 21, 2023
Aug 29, 2023
Nov 9, 2024
Sep 7, 2024
Jun 23, 2023

Repository files navigation

C# for Visual Studio Code

A Visual Studio Code extension that provides rich language support for C# and is shipped along with C# Dev Kit. Powered by a Language Server Protocol (LSP) server, this extension integrates with open source components like Roslyn and Razor to provide rich type information and a faster, more reliable C# experience.

Recommended Install

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. Open a folder/workspace that contains a C# project (.csproj) and a C# solution (.sln) and the extension will activate.
  3. Whether you install C# Dev Kit or just the C# extension, the .NET Install Tool will be installed as a dependency.

Note: If working on a solution that requires versions prior to .NET 6 or non-solution based projects, install a .NET Framework runtime and MSBuild tooling.

  • Set omnisharp.useModernNet to false and set dotnet.server.useOmnisharp to true
  • Uninstall or disable C# Dev Kit
  • Windows: .NET Framework along with MSBuild Tools
  • MacOS/Linux: Mono with MSBuild

Features

Learn more about the rich features of the C# extension:

For more information you can:

How to use OmniSharp?

If you don’t want to take advantage of the great Language Server features, you can revert back to using OmniSharp by going to the Extension settings and setting dotnet.server.useOmnisharp to true. Next, uninstall or disable C# Dev Kit. Finally, restart VS Code for this to take effect.

Found a Bug?

To file a new issue:

  1. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Open Settings (UI)", and press Enter.
  2. Search for "trace" in the search bar. Under "Dotnet > Server: Trace" select "Trace" from the drop down. This will provide more output information.
  3. Reload the window by opening the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type "Reload Window", and press Enter.
  4. Next, check the C# logs in the Output Window by opening it with Ctrl+Shift+U (Cmd+Shift+U on macOS), and select C# from the dropdown.
  5. Select and copy all the text in the log, and then report the issue through VS Code.
  6. Open the Command Palette with Ctrl+Shift+P (Cmd+Shift+P on macOS), type “CSharp: Report an issue”, and press Enter.
  7. This will open a window with all the necessary information related to the C# extension, dotnet version, mono version, etc.
  8. Paste the previously copied C# log into the “Steps to Reproduce” field. Please also include a description of what you were doing/attempting to do at the time the problem occurred.
  9. Click the “Preview on GitHub” button, and then file the issue.

Alternatively, you could visit https://github.com/dotnet/vscode-csharp/issues and file a new issue there.

Contributing

License

Copyright © .NET Foundation, and contributors.

The Microsoft C# extension is subject to these license terms. The source code to this extension is available on https://github.com/dotnet/vscode-csharp and licensed under the MIT license.

Code of Conduct

This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community. For more information see the .NET Foundation Code of Conduct.

Contribution License Agreement

By signing the CLA, the community is free to use your contribution to .NET Foundation projects.

.NET Foundation

This project is supported by the .NET Foundation.

Feedback

Provide feedback File questions, issues, or feature requests for the extension.

Known issues If someone has already filed an issue that encompasses your feedback, please leave a 👍 or 👎 reaction on the issue to upvote or downvote it to help us prioritize the issue.

Quick survey Let us know what you think of the extension by taking the quick survey.