C# for Visual Studio Code (powered by OmniSharp)
Welcome to the C# extension for Visual Studio Code! This extension provides the following features inside VS Code:
- Lightweight development tools for .NET Core.
- Great C# editing support, including Syntax Highlighting, IntelliSense, Go to Definition, Find All References, etc.
- Debugging support for .NET Core (CoreCLR). NOTE: Mono debugging is not supported. Desktop CLR debugging has limited support.
- Support for project.json and csproj projects on Windows, macOS and Linux.
The C# extension is powered by OmniSharp.
Get Started Writing C# in VS Code
What's new in 1.23.0
What's new in 1.22.2
What's new in 1.22.1
- Added LSP handler for
textDocument/codeAction request. (PR: omnisharp-roslyn#1795)
- Expose a custom LSP
omnisharp/client/findReferences command via code lens (meant to be handled by LSP client). (PR: #omnisharp-roslyn/1807)
DirectoryDelete option to
FileChangeType allowing clients to report deleted directories that need to be removed (along all the files) from the workspace (PR: #3829, PR: omnisharp-roslyn#1821)
- Do not crash when plugin assembly cannot be loaded (omnisharp-roslyn#1307, PR: omnisharp-roslyn#1827)
- Update browser launch regex to support non-default logging frameworks (#3842)
- Improved support for Codespaces
What's new in 1.22.0
Emmet support in Razor files
To enable emmet support, add the following to your settings.json:
The C# semantic highlighting support is in preview. To enable, set
true in your settings. Semantic highlighting is only provided for code files that are part of the active project.
To really see the difference, try the new Visual Studio 2019 Light and Dark themes with semantic colors that closely match Visual Studio 2019.
Supported Operating Systems for Debugging
Found a Bug?
To file a new issue to include all the related config information directly from vscode by entering the command pallette with Ctrl+Shift+P
(Cmd+Shift+P on macOS) and running
CSharp: Report an issue command. This will open a browser window with all the necessary information related to the installed extensions, dotnet version, mono version, etc. Enter all the remaining information and hit submit. More information can be found on the wiki.
Alternatively you could visit https://github.com/OmniSharp/omnisharp-vscode/issues and file a new one.
- Node.js (8.11.1 or later)
- Npm (5.6.0 or later)
To run and develop do the following:
npm run compile
- Open in Visual Studio Code (
- Optional: run
npm run watch, make code changes
- Press F5 to debug
To test do the following:
npm run test or F5 in VS Code with the "Launch Tests" debug configuration.
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/OmniSharp/omnisharp-vscode 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.
This project is supported by the .NET Foundation.