Official C# support for Visual Studio Code (powered by OmniSharp)
Перейти к файлу
Dustin Campbell f31b877fc5 Merge pull request #907 from DustinCampbell/future
v1.5.0-future-preview1
2016-11-10 04:45:57 -08:00
.vscode Set extension path during extension activation 2016-10-26 07:52:01 -07:00
RuntimeLicenses Update the runtime license with latest text from Microsoft Legal (#684) 2016-08-19 08:53:52 -07:00
images Add C# icon to package 2016-03-10 15:38:14 -08:00
snippets Made ctor snippet use tabs and removed space 2016-10-28 16:14:42 +02:00
src Merge branch 'concurrent-server' into future 2016-11-10 01:45:21 -08:00
syntaxes Allow single-line comments after preprocessor directives 2016-09-19 23:12:38 +01:00
test Remove OperatingSystem enum in favor of PlatformInformation helpers 2016-11-02 11:26:37 -07:00
typings Remove some dead dependencies 2016-11-02 09:19:24 -07:00
.editorconfig Add .editorconfig file 2016-09-01 09:52:47 -07:00
.gitignore Reimplement debugger acquisition to use Package Manager 2016-11-04 14:04:20 -07:00
.travis.yml Added tests for syntax highlighting 2016-09-23 21:34:06 +01:00
.vscodeignore Clean up npm scripts and start running tests 2016-09-01 08:11:11 -07:00
ISSUE_TEMPLATE Add github issue template 2016-06-01 16:57:19 -07:00
LICENSE.txt license files 2015-12-03 11:31:12 +01:00
README.md Fixed typos. 2016-09-23 21:44:17 +01:00
ThirdPartyNotices.txt add grammar file for syntax highlights 2015-12-10 15:23:13 +01:00
csharp.configuration.json add grammar file for syntax highlights 2015-12-10 15:23:13 +01:00
debugger.md debugger.md: Update docs for 1.3 features (#598) 2016-07-20 13:18:45 -07:00
gulpfile.js Respond to code review feedback 2016-11-07 13:23:17 -08:00
package.json v1.5.0-future-preview1 2016-11-10 04:42:02 -08:00
tsconfig.json Clean up npm scripts and start running tests 2016-09-01 08:11:11 -07:00
tslint.json Enable tslint 2016-01-17 20:48:38 +01:00

README.md

C# for Visual Studio Code (powered by OmniSharp)

Master Release
Master Build Status Release Build Status

Welcome to the C# extension for Visual Studio Code! This preview 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 and Desktop CLR debugging is not supported.
  • Support for project.json projects on Windows, macOS and Linux, and csproj projects on Windows.

The C# extension is powered by OmniSharp.

Get Started Writing C# in VS Code

What's New in 1.4

Metadata as Source

  • Go to Definition (F12) can now show a C#-like view for APIs that do not appear in your project's source code. (#165)

Debugger

  • Applications can now be launched without attaching the debugger with Ctrl+F5.
  • Support for new "embedded portable PDB" debug format.
  • The launch.json file generator now automatically sets the option to show a console window by default ("internalConsoleOptions": "openOnSessionStart").

New Settings

Several new settings have been added:

  • csharp.suppressDotnetInstallWarning: Suppress the warning that the .NET CLI is not on the path.
  • omnisharp.autoStart: Used to control whether the OmniSharp server will be automatically launched when a folder containing a project or solution is opened. The default value for this setting is true.
  • omnisharp.path: Can be used to specify a file path to a different OmniSharp server than the one that will be used by default. Previously, this option was controlled by csharp.omnisharp, which is now deprecated.
  • omnisharp.useMono: When omnisharp.path is specified, this controls whether OmniSharp will be launched with Mono or not. Previously, this option was controlled by csharp.omnisharpUsesMono, wich is now deprecated.
  • omnisharp.loggingLevel: Used to control the level of logging output from the OmniSharp server. Legal values are "default" or "verbose".

Colorizer

There have been several fixes to the colorizer grammar resulting in much smoother syntax highlighting, with better support for C# 6.0. Special thanks go to @ivanz and @seraku24 for contributing most of the fixes below!

  • Expression-bodied members (#638, #403, #679, #249)
  • Escaped keyword identifiers (#614)
  • Using directives and nested namespaces (#282, #381)
  • Field and local variable type names (#717, #719)
  • Multi-dimensional arrays in parameters (#657)

Performance

  • Improvements have been made in processing diagnostics (i.e. errors and warnings).
  • Full solution diagnostics are no longer computed for large solutions (e.g. solutions with >1000 files across all projects). However, diagnostics are still computed for open files.

Other Improvements

  • Multibyte characters are now properly encoded, resulting in proper display in tooltips and fixing crashes in the OmniSharp server. (#4, #140, #427)
  • Will no longer attempt to install a CoreCLR flavor of OmniSharp on Ubuntu versions other than 14 and 16. (#655)
  • Opening a solution or csproj no longer results in '0 projects' displayed in the status bar. (#723)

Supported Operating Systems

  • Currently, the C# extension supports the following operatings systems:
    • Windows (64-bit only)
    • macOS
    • Ubuntu 14.04 / Linux Mint 17
    • Ubuntu 16.04
    • Debian 8.2
    • CentOS 7.1 / Oracle Linux 7
    • Red Hat Enterprise Linux (RHEL)
    • Fedora 23
    • OpenSUSE 13.2

Found a Bug?

Please file any issues at https://github.com/OmniSharp/omnisharp-vscode/issues.

Debugging

The C# extension now supports basic debugging capabilities! See http://aka.ms/vscclrdebugger for details.

Development

First install:

  • Node.js (newer than 4.3.1)
  • Npm (newer 2.14.12)

In case you get a node-gyp error follow the instrutions here to fix it. The vscode-textmate package pulls in a native node dependency and those instructions will set up the node build tool which deals with those.

To run and develop do the following:

  • Run npm i
  • Open in Visual Studio Code (code .)
  • Optional: run tsc -w, make code changes (on Windows, try start node ".\node_modules\typescript\bin\tsc -w")
  • Press F5 to debug

To test do the following: npm run test

License

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.