Master | Release |
---|---|
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.
Because of the new minimum MSBuild version requirement of these new SDKs, it will be necessary to use the Mono packaged with the C# extension. The meaning of "omnisharp.useGlobalMono" has change to "never", this forces the use of the included Mono. To use your system install of Mono set the value to "always" although it may not be compatible with newer SDKs.
- Ensure that all quickinfo sections have linebreaks between them, and don't add unecessary duplicate linebreaks (PR: omnisharp-roslyn#1900)
- Support completion of unimported types (PR: omnisharp-roslyn#1896)
- Exclude Misc project from InternalsVisibleTo completion (PR: omnisharp-roslyn#1902)
- Ensure unimported things are sorted after imported things (PR: omnisharp-roslyn#1903)
- Correctly handle multiple reference aliases (PR: omnisharp-roslyn#1905)
- Better handle completion when the display text is not in the final result (PR: omnisharp-roslyn#1908)
- Correctly mark hover markup content as markdown (omnisharp-roslyn#1906, PR: omnisharp-roslyn#1909)
- Upgrade lsp (omnisharp-roslyn#1898, PR: omnisharp-roslyn#1911)
- Updated to ILSpy 6.1.0.5902 (PR: omnisharp-roslyn#1913)
- Updated to NET 5.0 preview8 (PR: omnisharp-roslyn#1916)
- Add HTTP Driver back to build.json (PR: omnisharp-roslyn#1918)
- Updated the docs to mention .NET 4.7.2 targeting pack (PR: omnisharp-roslyn#1922)
- Support for configurations remapping in solution files (omnisharp-roslyn#1828, PR: omnisharp-roslyn#1835)
- Only run dotnet --info once for the working directory (PR: omnisharp-roslyn#1925)
- Update build tool versions for NET 5 RC1 (PR: omnisharp-roslyn#1926)
- Update Roslyn to 3.8.0-3.20451.2 (PR: omnisharp-roslyn#1927)
- Clean up Blazor WebAssembly notifications (PR: #4018)
- Remove proposed api attribute (PR: #4029)
- New completion service including override and unimported type completion (
omnisharp.enableImportCompletion
) (PR: #3986)
- Register FixAll commands for disposal (#3984, PR: #3985)
- Register FixAll commands for disposal (#3984, PR: #3985)
- Include version matched target files with minimal MSBuild (PR: omnisharp-roslyn#1895)
- Fix lack of trailing italics in quickinfo (PR: omnisharp-roslyn#1894)
- Set meaning of UseGlobalMono "auto" to "never" until Mono updates their MSBuild (PR: #3998)
- Updated Razor support
- Fully qualify component light bulb (dotnet/aspnetcore-tooling#22309)
- Add using for component light bulb (dotnet/aspnetcore-tooling#22308)
- Create component from tag light bulb (dotnet/aspnetcore-tooling#22307)
- Go to definition on Blazor components (dotnet/aspnetcore-tooling#17044)
- Rename Blazor components (dotnet/aspnetcore-tooling#22312)
- Prepare Blazor debugging to have better support for "Start without debugging" scenarios (dotnet/aspnetcore-tooling#24623)
- Fix typo in supressBuildAssetsNotification setting name (#3941, PR: #3942)
- Introduced a new
/quickinfo
endpoint to provide a richer set of information compared to/typeinfo
. Consumers are encouraged to use it as their hover provider (omnisharp-roslyn#1808, PR: omnisharp-roslyn#1860 - Added support for Roslyn
EmbeddedLanguageCompletionProvider
which enables completions for string literals forDateTime
andRegex
(omnisharp-roslyn#1871) - Improve performance of the
textDocument/codeAction
request. (PR: omnisharp-roslyn#1814) - Provide a warning when the discovered MSBuild version is lower than the minimumMSBuildVersion supported by the configured SDK (PR: omnisharp-roslyn#1875)
- Use the real MSBuild product version during discovery (PR: omnisharp-roslyn#1876)
- Fixed debugging in .NET 5 preview SDKs (#3459, PR: omnisharp-roslyn#1862)
- Move omnisharp vscode to the new hover implementation (#3928)
- Ignore screen size is bogus errors with ps (#3580, PR: #3961)
- Fix all providers support (PR: #3440, PR: omnisharp-roslyn#1581)
- Fix MSBuild version mismatch with new SDKs (omnisharp-vscode#3951, PR: #1883)
To enable emmet support, add the following to your settings.json:
"emmet.includeLanguages": {
"aspnetcorerazor": "html"
}
The C# semantic highlighting support is in preview. To enable, set editor.semanticHighlighting.enabled
and csharp.semanticHighlighting.enabled
to 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.
-
Currently, the C# debugger officially supports the following operating systems:
- X64 operating systems:
- Windows 7 SP1 and newer
- macOS 10.12 (Sierra) and newer
- Linux: see .NET Core documentation for the list of supported distributions. Note that other Linux distributions will likely work as well as long as they include glibc and OpenSSL.
- ARM operating systems:
- Linux is supported as a remote debugging target
- X64 operating systems:
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.
First install:
- Node.js (8.11.1 or later)
- Npm (5.6.0 or later)
To run and develop do the following:
- Run
npm i
- Run
npm run compile
- Open in Visual Studio Code (
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.
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.
By signing the CLA, the community is free to use your contribution to .NET Foundation projects.
This project is supported by the .NET Foundation.