Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>csharp-ls (Visual Studio Fork)New to Visual Studio Code? Get it now.
csharp-ls (Visual Studio Fork)

csharp-ls (Visual Studio Fork)

Zachary Christmas

|
38 installs
| (0) | Free
C# LSP client with Visual Studio MSBuild support. Fork of csharp-language-server projects with enhancements by Zach Christmas.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C# Language Server - Visual Studio Enhanced Fork

License: MIT Visual Studio VS Code

Enhanced by Zach Christmas | Original VS Code extension by Vytautas Survila

VS Code extension for the enhanced csharp-language-server with Visual Studio MSBuild support and lazy solution loading.

🚀 What's New in This Fork

Visual Studio MSBuild Support

  • ✅ Automatic detection of Visual Studio Community/Professional installations
  • ✅ Custom MSBuild path configuration in VS Code settings
  • ✅ Environment variable integration for seamless setup
  • ✅ Enhanced error handling for MSBuild issues

Lazy Solution Loading

  • ⚡ On-demand loading - solutions load only when you open C# files
  • 🚀 Faster startup - no more waiting for all solutions to load at once
  • 🎯 Multi-solution support - perfect for large monorepos
  • 🔄 Smart solution selection with command palette integration

📦 Installation

Prerequisites

  1. Install the language server first:

    dotnet tool install --global csharp-ls-vs
    
  2. Install this extension from the VS Code marketplace

Requirements

  • .NET 9.0 SDK or later
  • Visual Studio Community/Professional (recommended)
  • VS Code 1.80 or later

⚙️ Configuration

Basic Setup (Recommended)

{
  "csharp-ls.csharp-ls-executable": "csharp-ls-vs",
  "csharp-ls.msbuild.path": "C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin"
}

Advanced Configuration

Setting Description Default
csharp-ls.csharp-ls-executable Path to language server executable "csharp-ls-vs"
csharp-ls.msbuild.path MSBuild directory path ""
csharp-ls.msbuild.executable MSBuild executable path ""
csharp-ls.trace.server LSP communication tracing {"verbosity": "off"}

🎯 Usage

Automatic Solution Loading

  1. Open VS Code in your C# workspace
  2. Open any .cs file → Solution loads automatically via lazy loading
  3. IntelliSense activates with full project context

Manual Solution Selection

  • Command Palette (Ctrl+Shift+P)
  • Type: csharp-ls: Select solution or project
  • Choose from available solutions

Multiple Solutions

  • Each solution loads only when needed
  • Switch between projects seamlessly
  • No performance impact from unused solutions

✨ Features

  • 🔍 Go to Definition (including decompiled metadata)
  • 💡 IntelliSense & code completion
  • 🏷️ Symbol search across projects
  • 🔧 Code actions & refactoring
  • 📝 Hover documentation
  • ⚠️ Diagnostics & error reporting
  • 🎨 Syntax highlighting via Roslyn
  • 📁 Multi-solution workspaces

🛠️ Troubleshooting

Language Server Not Starting

  1. Verify installation: dotnet tool list --global
  2. Check version: csharp-ls-vs --version
  3. Review VS Code Output → "C# Language Server"

MSBuild Issues

  1. Ensure Visual Studio is installed
  2. Verify MSBuild path exists
  3. Configure custom path in settings if needed
  4. Check Output panel for specific errors

Solution Loading Problems

  1. Ensure .sln files exist in workspace
  2. Use "Select solution" command manually
  3. Check file permissions and paths

📄 Attribution & License

🙏 Original Work

This extension is a fork of outstanding work by:

  • Vytautas Survila - Original vscode-csharp-ls
  • Saulius Menkevičius - Original csharp-language-server

🔧 Fork Enhancements

  • Zach Christmas - Visual Studio MSBuild support and lazy loading integration

📋 License

MIT License (same as original projects)

⚠️ Support Notice

This is a fork with limited support.

  • For general language server issues: Check the original csharp-language-server
  • For general extension issues: Check the original VS Code extension
  • For fork-specific issues: Use this fork's issue tracker

🔗 Related Projects

  • Language Server Fork: zachristmas/csharp-language-server
  • Original Language Server: razzmatazz/csharp-language-server
  • Original VS Code Extension: vytautassurvila/vscode-csharp-ls

Thank you to the original authors for their excellent foundation! 🎉

Enjoy enhanced C# development with Visual Studio MSBuild support! 🚀

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft