C# Solution Explorer

A C# Solution Explorer for VS Code — and Open VSX-compatible editors such as VSCodium — with an optional bundled Roslyn language server, so you can get IntelliSense without any Microsoft-proprietary extension.


Vision
The long-term goal is a VS Code extension that gives C# (and Razor) developers everything they need to write and debug their code, without depending on Microsoft-proprietary-only extensions (like C# Dev Kit) that aren't available on Open VSX. As a step toward that, this version can now host its own C# language server (Roslyn) for IntelliSense, with Razor cohosting on by default — see C# Language Server. Razor debugging is still not part of this version.
Features
- Dedicated Activity Bar view showing
Solution → Solution Folders → Projects → Folders/Files.
- Parses
.sln and .slnx solution files, including Solution Folder nesting; falls back to a loose top-level .csproj when no solution file is found.
- Per-project Dependencies tree grouped into Visual Studio-style categories (Frameworks, Analyzers, Packages, Projects), with full NuGet and project-reference management — see Dependencies & NuGet.
- NuGet Package Manager panel with Browse / Installed / Updates / Consolidate tabs over a solution-wide project checklist, package READMEs, and deprecation and vulnerability badges — see NuGet Package Manager.
- C# debugging (F5) via a bundled netcoredbg debugger — no Microsoft-proprietary extension required — with launch profiles from
launchSettings.json, startup project selection, and a real console via Debug Startup Project in External Terminal — see Debugging.
- Test Explorer in VS Code's native Testing view: tests discovered per project, run or debug down to a single test method, live results, and Run with Coverage with per-line highlighting — see Test Explorer.
- New Item templates, project scaffolding via
dotnet new, Build / Rebuild / Run / Test / Restore / Clean, rename, delete, and solution file management — see Commands.
- Project Properties panel: a project's csproj properties, NuGet package metadata and launch profiles as an editor tab, with a badge per property showing whether it is declared here, inherited from a
Directory.Build.props, or an SDK default — and formatting-preserving, one-line-diff writes — see Project Properties.
- Options panel: the extension's settings as an editor tab in the spirit of Visual Studio's Options dialog — grouped cards, User/Workspace scope switcher, search, per-setting reset. VS Code's built-in Settings editor stays one click away — see Settings.
- File nesting groups related files under a parent, like Visual Studio (
appsettings.*.json, .xaml.cs, .Designer.cs, .razor companions). Toggle with csharpSolutionExplorer.fileNesting.enabled.
- Auto-sync: the active editor's file is selected (and its parents expanded) in the tree automatically — plus Show in Solution Explorer on demand.
- Copy / Cut / Paste files and folders between folders and projects, and drag and drop projects between Solution Folders.
- Manual refresh button and automatic refresh via a file system watcher.
Debugging
Press F5 to build and debug the startup project directly — no launch.json, no debugger picker. The extension brings its own debugger, netcoredbg (Samsung, MIT), and reads launch profiles straight from Properties/launchSettings.json. Startup project and launch profile each live in their own status bar item; Debug Startup Project in External Terminal gives the program a real console for interactive input.
Debugging in detail → — F5 takeover rules, external terminal flow, netcoredbg's known limits.
Test Explorer
C# test projects appear in VS Code's native Testing view. Run or debug a whole project, a class, or a single test method — including data-driven cases, which nest under their method — with results, failure messages and clickable stack frames reported per test, and play icons in the editor gutter. Run with Coverage collects line coverage and highlights it in the editor; the extension offers to add the coverage package a project is missing.
A run also opens a Test Run Dashboard as an editor tab: one progress bar over all projects, live counts, an estimate of the time left — sharpened by the per-test durations of earlier runs — plus the failures with a jump to the source and the slowest tests of the run. Closing the tab never cancels the run.
Test Explorer in detail → — Microsoft.Testing.Platform vs. classic VSTest, single-test debugging, coverage packages, the dashboard, known limits.
Dependencies & NuGet
Every project gets a Visual Studio-style Dependencies tree with live outdated-package checks, and Manage NuGet Packages… opens a solution-wide panel mirroring Visual Studio's "Manage Packages for Solution" — including Central Package Management support.
Dependencies & NuGet in detail →
C# Language Server (experimental)
The extension can host the open-source Roslyn language server itself: IntelliSense, diagnostics, hover, go-to-definition for C# — and Razor language features via cohosting, on by default. It stays off automatically when the Microsoft C# extension is installed.
C# Language Server in detail →
Commands & Settings
Every context menu command and where it appears: Commands.
All csharpSolutionExplorer.* options and the New Item template variables: Settings.
Requirements
- VS Code ≥ 1.91 (or a compatible Open VSX editor) — the Test Explorer's coverage API needs 1.88, the bundled language client 1.91.
- .NET CLI (
dotnet) must be on your PATH for the Build, Rebuild, Run, Test, Restore, Clean, New Project, and NuGet package commands (Add/Update/Remove Package, and the NuGet Package Manager panel).
- A .NET runtime is required to run the bundled C# language server (the
dotnet SDK above provides one). The downloaded server is ReadyToRun but framework-dependent, not self-contained.
- Internet access is needed on first use of the language server (to download it from the Roslyn language server feed) and to nuget.org for package search, package details and README, and the outdated-package check. All are optional — set
csharpSolutionExplorer.languageServer.serverPath to run the server fully offline.
Development
npm install
Press F5 in VS Code to launch the Extension Development Host with the sample solution (samples/TaskFlow) already open.
npm run lint
npm run check-types
npm test
Setup details, the test layout and the commit convention are in CONTRIBUTING.md.
License
MIT
Third-party components — the vendored TextMate grammars, the bundled npm dependencies and
the language server and debugger downloaded at runtime — are listed with their licenses in
THIRD_PARTY_NOTICES.md. All of them are permissive open source
(MIT, ISC, Blue Oak); nothing copyleft is bundled or downloaded.