A Visual Studio Code extension for running, debugging, and exporting single C# files—no .csproj or solution required. Each open file gets its own isolated temp project with full .NET and NuGet support.
Features
Run & Debug Single C# Files
Instantly run or debug any standalone .cs file with no project setup required
Each open C# file gets its own isolated temp project/session
Breakpoints work as expected in the active editor
.NET Framework Selection
Choose from installed .NET SDKs/runtimes for each session
NuGet Package Management
Search NuGet.org live, add/remove packages per file session
View installed packages for the current file
Export as Project
Export the current session (code, csproj, packages) as a portable .NET project
Automatic Cleanup
Temp projects are cleaned up when files/VS Code are closed
Multi-file Support
Open and manage multiple C# files independently; all commands operate on the focused file
Usage
Right-click a .cs file or use the Command Palette to access all features under the CSSingleRun submenu
Hotkeys (in C# files):
Ctrl+Alt+R — Run
Ctrl+Alt+D — Debug
Ctrl+Alt+F — Select Framework
Ctrl+Alt+N — Manage Packages
Ctrl+Alt+Shift+N — Remove Package
Ctrl+Alt+I — Show Session Info
Ctrl+Alt+E — Export as Project
Requirements
.NET SDK installed and available in PATH
For debugging: C# Dev Kit or C# extension (for CoreCLR debug support)
For more details, see the in-extension help or open an issue for support.
The extension automatically detects installed .NET frameworks. No additional configuration needed.