MCPcopy
hub / github.com/dotnet/vscode-csharp

github.com/dotnet/vscode-csharp @v2.140.9 sqlite

repository ↗ · DeepWiki ↗ · release v2.140.9 ↗
2,577 symbols 6,438 edges 474 files 148 documented · 6%
README

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: * Refactoring: Edit your code with code fixes and refactorings * Navigation: Explore and navigate your code with features like Go To Definition and Find All References * IntelliSense: Write code with auto-completion * Formatting and Linting: Format and lint your code

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, follow the instructions at https://github.com/dotnet/vscode-csharp/blob/main/SUPPORT.md.

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.

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.

Extension points exported contracts — how you extend this code

Disposable (Interface)
(no doc) [14 implementers]
src/vscodeAdapter.ts
IDisposable (Interface)
(no doc) [6 implementers]
src/disposable.ts
TextDocumentContentProvider (Interface)
(no doc) [6 implementers]
src/razor/src/vscodeAdapter.ts
BaseEvent (Interface)
(no doc) [62 implementers]
src/shared/loggingEvents.ts
IEngine (Interface)
(no doc) [4 implementers]
src/omnisharp/engines/IEngine.ts
ISolutionSnapshotProvider (Interface)
(no doc) [3 implementers]
src/lsptoolshost/solutionSnapshot/ISolutionSnapshotProvider.ts
IPackage (Interface)
(no doc) [1 implementers]
src/packageManager/IPackage.ts
TmpAsset (Interface)
(no doc)
test/createTmpAsset.ts

Core symbols most depended-on inside this repo

assertMatchesSnapshot
called by 350
test/razor/razorTests/Microsoft.AspNetCore.Razor.VSCode.Grammar.Test/tests/infrastructure/testUtilities.ts
post
called by 231
src/eventStream.ts
log
called by 114
src/razor/src/razorLogger.ts
appendLine
called by 112
src/razor/src/vscodeAdapter.ts
toString
called by 111
src/razor/src/vscodeAdapter.ts
update
called by 109
src/razor/src/vscodeAdapter.ts
add
called by 87
src/compositeDisposable.ts
get
called by 72
src/razor/src/vscodeAdapter.ts

Shape

Method 1,005
Function 744
Class 488
Interface 306
Enum 34

Languages

TypeScript100%

Modules by API surface

src/omnisharp/omnisharpLoggingEvents.ts150 symbols
src/omnisharp/protocol.ts124 symbols
src/razor/src/vscodeAdapter.ts94 symbols
src/shared/options.ts87 symbols
src/vscodeAdapter.ts71 symbols
src/shared/processPicker.ts63 symbols
src/shared/assets.ts56 symbols
src/shared/loggingEvents.ts54 symbols
src/lsptoolshost/server/roslynLanguageServer.ts50 symbols
src/omnisharp/utils.ts46 symbols
src/omnisharp/server.ts40 symbols
src/omnisharp/engines/lspEngine.ts36 symbols

Dependencies from manifests, versioned

@github/copilot-language-server1.290.0 · 1×
@jest/globals29.6.2 · 1×
@microsoft/servicehub-framework4.2.99-beta · 1×
@octokit/rest20.0.1 · 1×
@types/archiver5.1.0 · 1×
@types/fs-extra11.0.4 · 1×
@types/minimist1.2.1 · 1×
@types/node24.10.8 · 1×
@types/semver7.3.13 · 1×
@types/tmp0.0.33 · 1×
@types/uuid9.0.1 · 1×
@types/vscode1.98.0 · 1×

For agents

$ claude mcp add vscode-csharp \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact