Skip to content

ylepikhov/CommandTaskRunner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command Task Runner extension

Adds support for command line batch files in Visual Studio 2015's Task Runner Explorer. Supports .cmd, .bat, .ps1 and .psm1 files.

Build status

Download the extension at the VS Gallery or get the nightly build

Add commands

The easiest way to add a batch file to Task Runner Explorer is to right-click it in Solution Explorer and select Add to Task Runner

Context menu

You can right-click supported batch files in either solution folders or from within a any project.

Doing so will create a commands.json file. If you right-clicked a batch file in a solution folder, then the commands.json file will be placed in the solution folder. If the batch file is in a project you will be prompted to select to either put it in the project or solution folder.

If a commands.json file already exist, the new batch file will be added.

Execute scripts

When scripts are specified, the Task Runner Explorer will show those scripts.

Task list

Each script can be executed by double-clicking the task.

commands.json locations

The Task Runner Explorer supports multiple task runners in the same solution. For instance, you can have commands specified for the solution and additional ones for each project in that solution.

Task Runner Explorer will try to find a commands.json file in any parent folder to either the individual projects or the solution until it hits the root of the drive.

Commands

Inside commands.json it is possible to add custom scripts inside the "scripts" element.

{
	"commands": {
		"Build": {
			"FileName": "cmd.exe",
			"WorkingDirectory": ".",
			"Arguments": "/c build\\build.cmd"
		}
	}
}

Commands with no batch file

You can execute any command inside commands.json by manually editing it. A batch file is not needed if you just need to execute simple commands.

Drag and drop

You can drag any supported batch file onto commands.json to add it. Just keep in mind that Visual Studio doesn't support drag and drop from solution folders.

Bindings

Script bindings make it possible to associate individual scripts with Visual Studio events such as "After build" etc.

Visual Studio bindings

Intellisense

If you manually edit bindings in `command.json``, then full Intellisense is provided.

Bindings Intellisense

Open Command Line

For the optimal experience with batch file and Visual Studio, try the free Open Command Line extension for even more features.

About

A Visual Studio extension

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%