Download this extension from the Visual Studio Marketplace or get the CI build.
Run your scripts and executables with a single click. Console Runner adds a context menu command to Solution Explorer that lets you quickly execute batch files, PowerShell scripts, and executables directly from Visual Studio.
✨ Key Features
- Execute batch files — Run
.cmdand.batfiles in a new command prompt window - Execute PowerShell scripts — Run
.ps1files in a new PowerShell window with execution policy bypassed - Execute programs — Run
.exefiles directly - Smart working directory — All scripts execute from their containing folder
- Context-aware — Command only appears when you select a supported file type
Supported file types: .cmd, .bat, .ps1, .exe
How to Use
- Right-click any
.cmd,.bat,.ps1, or.exefile in Solution Explorer - Select Execute File from the context menu
- The file will run in a new terminal window with the correct working directory
Batch files and PowerShell scripts will keep the terminal window open after execution, so you can see the output and any errors.
Why Console Runner?
If you work with scripts or utilities in your solution, you know the friction:
- Context switching – Opening a separate terminal and navigating to the script location
- Remembering paths – Typing out the full path to run an executable
- Extra steps – Setting execution policies or working directories manually
Console Runner removes all of these barriers, giving you instant execution right from Solution Explorer.
Use Cases
- Build scripts – Quickly run custom build or deployment batch files
- DevOps automation – Execute PowerShell scripts for provisioning or cleanup
- Utility programs – Run helper executables without leaving Visual Studio
- Testing scripts – Try out command-line tools that are part of your solution
Requirements
- Visual Studio 2022 (version 17.0 or later)
- Windows operating system
How can I help?
If you enjoy using the extension, please give it a ★★★★★ rating on the Visual Studio Marketplace.
Should you encounter bugs or have feature requests, head over to the GitHub repo to open an issue if one doesn't already exist.
Pull requests are also very welcome, as I can't always get around to fixing all bugs myself. This is a personal passion project, so my time is limited.
Another way to help out is to sponsor me on GitHub.