.NET Runner - VS Code Extension
A powerful Visual Studio Code extension for executing C# and F# files with a simple play button and integrated console output.
✨ Features
🎯 Core Functionality
- ▶️ One-Click Execution: Play button directly in the editor toolbar
- 📊 Integrated Console: All output displayed directly in VS Code
- 🔄 Real-time Output: Live streaming of program output
- ⚡ Smart Detection: Automatic recognition of .cs, .fs and .csproj files
- 🎛️ Flexible: Execute current file or Program.cs/Main.cs
- 📋 Side Panel: Dedicated panel with file explorer and quick actions
🛠️ Advanced Features
⌨️ Keyboard Shortcuts
Ctrl+F5
: Execute current file
Ctrl+Shift+F5
: Execute Program.cs/Main.cs
Ctrl+Shift+B
: Build project
Ctrl+Shift+X
: Stop running process
Ctrl+Shift+N
: Open .NET Runner panel
🔄 Smart Features
- Project Detection: Automatic recognition of .csproj/.fsproj files
- 🔨 Build Integration: Integrated compilation with MSBuild
- 🎨 Status Bar Integration: Live status with indicators
- 🛑 Process Control: Stop running processes
- 🧹 Output Management: Formatted output with time tracking
- ⚙️ Configurable: Customizable .NET settings
- 🌐 Multi-language: German and English interface
🚀 Quick Start
- Installation: Install extension from VS Code Marketplace
- Open File: Open a .cs, .fs or .csx file
- Execute: Click ▶️ play button in toolbar or use
Ctrl+F5
- View Output: See results in the ".NET Runner" output channel
- Open Panel: Click .NET Runner icon in activity bar
📋 Supported File Types
- ✅ C# (.cs) - Direct execution or as part of a project
- ✅ F# (.fs) - F# compiler integration
- ✅ .NET Projects (.csproj, .fsproj) - Complete project execution
- ✅ C# Scripts (.csx) - C# scripting with dotnet-script
📋 Usage
Action |
Shortcut |
Description |
Run Current File |
Ctrl+F5 |
Executes the currently opened file |
Run Project |
Ctrl+Shift+F5 |
Executes Program.cs from workspace |
Build Project |
Ctrl+Shift+B |
Compiles the .NET project |
Stop Execution |
Ctrl+Shift+X |
Stops the running process |
Open Panel |
Ctrl+Shift+N |
Opens the .NET Runner side panel |
Right-click on C#/F# files for quick access:
- ▶️ Run .NET File
- ▶️ Run Project
- 🔨 Build Project
⚙️ Configuration
Go to VS Code Settings and search for ".NET Runner":
{
"dotnet-runner.dotnetExecutable": "dotnet",
"dotnet-runner.clearOutputBeforeRun": true,
"dotnet-runner.autoSaveBeforeRun": true,
"dotnet-runner.autoBuildBeforeRun": true,
"dotnet-runner.buildConfiguration": "Debug",
"dotnet-runner.showRunningIndicator": true,
"dotnet-runner.language": "en"
}
Language Settings
- English:
"dotnet-runner.language": "en"
(default)
- German:
"dotnet-runner.language": "de"
🎯 Examples
Example C# Console App
using System;
namespace TestApp
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("🚀 Hello from .NET Runner!");
Console.WriteLine($"📅 Current time: {DateTime.Now}");
Console.WriteLine($"✅ .NET Version: {Environment.Version}");
}
}
}
Example F# Script
open System
[<EntryPoint>]
let main argv =
printfn "🚀 Hello from F# in .NET Runner!"
printfn "📅 Current time: %s" (DateTime.Now.ToString())
printfn "🎉 F# is running perfectly!"
0
📊 Output Channel Features
- 🔄 Status Indicators: Clearly recognizable symbols
- 📁 Path Display: Complete file path
- ⚙️ Configuration: .NET version and arguments
- ✅/❌ Exit Codes: Success/error status
- ⏱️ Time Tracking: Execution time for each run
Example Output
🔄 Running: Program.cs
📁 Path: C:\workspace\TestApp\Program.cs
📦 Project: TestApp (.NET 8.0)
⚙️ Command: dotnet run
--------------------------------------------------
🚀 Hello from .NET Runner!
📅 Current time: 20.08.2025 15:30:45
✅ .NET Version: 8.0.0
--------------------------------------------------
✅ Process completed successfully (exit code: 0)
⏱️ Execution time: 1.234s
- Website: pyengine.de
- Email: admin@pyengine.de
- Bug Tracker: GitHub Issues
- Support: Create an issue on GitHub
🎉 Changelog
0.0.1 (Current)
- ✨ Initial Release
- ▶️ Play Button Integration
- 📊 Output Channel Support
- ⌨️ Keyboard Shortcuts (Ctrl+F5, Ctrl+Shift+F5, Ctrl+Shift+B)
- ⚙️ Configuration Options
- 🔄 Process Management
- 🎯 C#, F# and .csx Support
- 📋 Side Panel Integration
- 🌐 Multi-language Support (EN/DE)
- 🔨 Build Integration
- 🎨 Status Bar Integration
- 🛑 Process Stop Functionality
Made with ❤️ for .NET Developers