Task Runner Explorer

Microsoft DevLabs Free

Provides custom task runner support to Visual Studio.

(24) Review
Visual Studio
Download (34,424)
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Reviews (24)
Q and A (79)
Sign in to write a review
Sort by:

by Eric Aldinger | June 10 2015

I really like this so far. Good job.

The test output is nicer in the explorer than the output directly from the cli. I wish I knew how to capture that formatting for our build output.

I would like to access this from within the context of any js file.

I would like the option to mute warnings like ">> Local Npm module "grunt-sync" not found. Is it installed?" It should be installed IMHO, but that is a matter of debate for our team. So the warning is not of value right now.

Instead of having jshint and htmlhint directly under Tasks, perhaps move them under a general Hint level. This could enable users to either lint both at the same time, or either independently.

by Guilherme Magalhães | April 03 2015

I'm getting "object reference not set to an instance of an object" while clicking the refresh projects button... Only happens in one new Win10 machine with 2013 and 2015 installed.

Is there a way to debug the extension or get logs?

by LongDinhLe | April 01 2015

by Justin_Butler | March 30 2015

Mads -

Great extension and really helped me get some outsourced front-end code into our Visual Studio environment. In order to take this to the next level, it would be great if there were built-in support in Visual Studio for getting Gulp into the build pipeline so that we can really take advantage of this in Continuous Integration scenarios. There is a really good article about this by Steve Cadwallader on his blog, which can be found here:


Hope you consider making this part of Visual Studio's default functionality. Again thanks for your work thus far!


by KyleButler | March 03 2015

I can't get it to work. Gulp works fine from the command line, but in VS I just get "Process terminated with code 1". No idea what the problem is or how to fix it

by cslater | March 02 2015

Please fix the crash every time you size the splitter window.

by JHubSharp | February 16 2015

Awesome work. The tooling here and elsewhere in VS2015 has really renewed my focus on client-side development. Thanks!

by Pat James | February 12 2015

It is a nice idea but it completely breaks Visual Studio's git integration. To me, git is much more valuable inside VS. I can run gulp, grunt, etc just fine outside of VS with very little reduction in capability from what Task Runner Explorer offers. Not so with git. Maybe if/when this bug https://connect.microsoft.com/VisualStudio/Feedback/Details/865064 is resolved I will give it another try.

by DevDells | January 23 2015

You don't need a file save event to bind to. Just use the Grunt watcher.
Takes a little time to get Grunt integrated in your workflow, but this Task Runner makes it so much simpler.
Staying in VS makes it more transparent.

by Guido Müller | January 16 2015

Nice tool. From my perspective it would be an improvement to have a binding for a file save action to trigger a grunt task.

by Jorge Neyra | January 16 2015

This works great! I have 2 issues though. One was mentioned by another user about the tasks taking too long for the production files to be ready before publishing. My second issue is that any new files created by the tasks are not automatically included in the project.

by MaksimVi | January 08 2015

Great idea, but still needs improvements. Bindings seem to be triggered by every project inside the solution instead of just the one containing gruntfile.

by vilicvane | December 21 2014

Great to have this. And it would be great if there's a quick way to know the updates of running tasks without unfold task runner.

by LordDawnhunter | December 09 2014

Great tool but there is a small issue.
When publishing a web project, the package is created before "gulp" has finished running.
So, there is either missing files or files that are empty.

by Christiaan Rakowski | December 06 2014

by KatieArnott | November 12 2014

Can you add a gulp task to VS’s publish event?

Mads Kristensen November 18 2014
| Edit |

Yes. Your .pubxml file is actually an MSBuild file, so you can easily call any command line tool from it

by JayChase | November 06 2014

Just getting started but it seems stable and easy to use.

by Templarian | September 26 2014

No issues so far, installed it and tested it out on one of our large AngularJS projects at work without any modifications.

I wish there was a way to assign an alias to a button (on the toolbar). We have build.local and build.staging.

//Update: Yes, Hotkeys functionality would actually be better. I would probably prefer the hotkeys over a physical button (but some might like the button). (it deleted your reply when I updated this text).

by leoduran | September 17 2014

I put together a simple spike and everything worked well. Once I transitioned to a larger project the extension stopped working when I right click the Gruntfile. Do you have a place for submitting issues?

Great job with the extension. It will change the way we develop client-side code going forwards.

Take care,

Mads Kristensen September 19 2014
| Edit |

Please submit the issues under the "Q AND A" tab or send them to me directly at madsk at Microsoft com. Thanks

by jimmcslim | September 07 2014

Getting there... a great preview of what is to come.

Probably worth mentioning, especially to 'new-age front-end dev' newbs like myself, that you need to have done 'npm install -g grunt-cli' from your command line to get the Task Runner Explorer to work with Grunt... it won't parse the gruntfile.js otherwise. I think I thought that having listed grunt in the package.json devDependencies that would be sufficient, nor is doing 'npm install -g grunt' enough ,you need the cli tools (which are themselves dependent upon the grunt package). Just a trick for new players!

Mads Kristensen October 01 2014
| Edit |

I've added that to the Prerequisites section in the description. In VS14, those tools will be installed by VS so you won't have to install them separately yourself.

1 - 20 of 24 Items   
Sign in to start a discussion

  • Project with gulpfile.js in subpaste
    2 Posts | Last post Sun 4:16 PM
    • Hello everybody! I'm working on a project, and when I put the project containing gulpfile.js in a subfolder, the plugin really did not recognize him anymore. The structure looked like this:
          paste 1
             paste 1.1
          paste 2
          paste 3
      Someone went through this too?
    • Yep, same issue here.
  • "Project Open" bound task is launched twice when VS2015 RTM is opened
    3 Posts | Last post July 21, 2015
    • I'm using a clean install of VS2015 RTM community edition. I have a single task bound to "Project Open". When the project is opened from a state where VS is already running, the task will be launched once, correctly (though the TRE window seems to force itself to pop-up - I personally would prefer it not to, like it does in VS2013).
      Anyway, my setting in Options -> Environment -> Startup is "Load last loaded solution" so when I open VS it would automatically load the last solution, and TRE would launch the task twice. I have this happening on two of my projects that are set this way (I don't have any other projects that use TRE).
      Having to close one instance every time is quite annoying, and since this isn't really an add-on anymore, I'm not sure exactly how and when it could be fixed. Is there at least a workaround for this problem?
    • Some more info: I'm using Windows 7 SP1 64bit. The task is a Grunt "watch" task. I tried to check if it is also happening with other tasks (like  grunt-ts), and it did. It also occurred randomly when VS was already running, but it only seems to happen consistently when VS is loaded right before the solution/project is opened. I also tried to disable Web Essentials and Web Compiler extensions (these are the only ones that were installed) and it had no effect. It happens very consistently in this scenario.
      The delay between the launching of the two instances looks like 1 or 2 seconds (they don't start exactly at the same time).
      The thing is I never used the VS2015 release candidates myself, so I have no idea if it also happened in the pre-release versions as well, and if it did, someone would have probably reported it? (I would definitely have reported it myself if I encountered it).
    • Screen capture video of the problem: 
      Microsoft connect bug report (with more detailed instructions for reproduction):
  • Compatibility with VS2015 Task Runner Explorer?
    3 Posts | Last post July 20, 2015
    • Hi Mads,
      I've noticed in the VS2015 RC that the binding comments are different:
      /// <binding AfterBuild='sass, browserify' ProjectOpened='watch, watchify' />
      /// <vs AfterBuild='sass, browserify' SolutionOpened='watch, watchify' />
      Will the two versions be compatible with each other in the future? I've noticed that in VS2013 no bindings are recognized if *both* comments are present in my gulpfile. VS2015 seemed happy enough to ignore the VS2013 binding.
    • Edit: Actually the behavior is that only the first /// comment line is read, the extension ignores any subsequent lines.
    • I seem to have the same issue with VS 2015 RTM. I'd like to have my solution work in both VS 2013 and VS 2015 but they both only look at the first line for bindings as far as I can tell.
  • Solution Platform and Solution Configuration
    5 Posts | Last post July 08, 2015
    • Is it possible to get the current solution platform and configuration (ie: Debug | Any CPU) from a grunt task?
    • I'd like to hear an answer to this topic too! Where can I define which gulpfile / gruntfile the task runner should use? And which platform it belongs to?
    • Closest I was able to get with this is to set an environment variable as a post-build task before calling gulp/grunt.  Then, in your task, you can check process.env.whatever.
      Pre-build event command line:
      cd $(ProjectDir)
      set NODE_ENV=$(ConfigurationName)
      var minify = process.env.NODE_ENV === "Release";
    • Have you tried using this NuGet package? https://github.com/kmees/MSBuild.NodeTools
      I believe it allows you to run a Grunt/Gulp task upon build that has the current build configuration in the task name.
    • This is quite essential feature and hopefully it will be added soon.  OTOH I wonder why is it missing in first place.
  • Additional parameters for grunt?
    1 Posts | Last post June 30, 2015
    • Can I add additional parameters to the grunt execution call?
      Especially I would like to have the "-force" Parameter added to the execution of grunt. 
  • Debug tests run via grunt?
    1 Posts | Last post June 30, 2015
    • I use grunt to start a couple of unit test files.
      Is there a way how I can break into the vs Debugger from within the Tests?
  • Project as Nested Folder
    1 Posts | Last post June 29, 2015
    • When I have the WebProject nested inside a folder at the soluction directory tree, the drop doesn't show up the Grunt / Gulp file. Do you have any solution for this issue? I did all organization of solution based on folders, to make stuff more clean.
              |--My Web Project
            --Test Projects
  • Change used node version
    3 Posts | Last post June 19, 2015
    • Is there a way to change the used node version of the task runner (in VS2015)?
      Because grunt-sass always fails because it was installed x64 but the task runner always executes ia32 version.
    • I don't know of any "supported method" but I have done this by overriding the existing bundled node.exe which can be found in C:\Program Files (x86)\PVisualStudio\Common7\IDE\Extensions\Microsoft\Web Tools\External\node
    • Don't know about vs2013 but in vs2015 you can. see http://blogs.msdn.com/b/webdev/archive/2015/03/19/customize-external-web-tools-in-visual-studio-2015.aspx for more info.
  • TRE not even showed up on the right click menu
    2 Posts | Last post May 27, 2015
    • Hi, when I right click on gruntfile.js, Task Runner Explorer is not listed in the menu. The first time I install TRE, I made a mistake by not installing grunt & gulf prior. However, I've since uninstall TRE 3 times (last time from within Visual Studio 2013.4 Professional), and TRE still not available in the right click menu.
      Any help, please?
    • Hi, found the solution. :) I click on View > Other Windows > Task Runner Explorer. After that, Task Runner Explorer becomes available on the right-click menu on the Gruntfile.js
  • Bug reporting
    8 Posts | Last post May 18, 2015
    • Where would be the best place to file bug report since I guess there is a better place than the Q and A?
    • For now, this is the best place to report bugs
    • When opening Task Runner Explorer it reports: "Failed to load. See ouput window (Ctrl + Alt + O) for more information.
      The output window reports the following:
      Failed to load "C:\inetpub\wwwroot\######\######\gruntfile.js"...
      Running "vs-grunt-task-reader" task
      The grunt file is running fine in Grunt from command line and also Grunt Launcher (1.6.5)
      Gruntfile.js as below:
      module.exports = function (grunt) {
        var config = {
          watch: {
            core: { files: ["ts/**/*.ts", "ts/**/*.tpl.html", "!ts/typings/**/*.ts"], tasks: ['ts:core', 'clean:core'], options: { spawn: false } },
          clean: {
            options: { force: true },
            core: { src: ["ts/**/*.js", "ts/**/*.js.map", "*.tmp.txt"] }
          ts: {
            core: {
              src: ["ts/**/*.ts", "!ts/typings/**/*.*"], html: ["ts/**/*.tpl.html"], reference: "ts/reference.ts", out: 'js/neo.js', options: { noImplicitAny: true, declaration: false }
        var defaultTasks = [];
        grunt.registerTask("default", defaultTasks);
      I have even tried a barebone file as well, with the same result.
    • Where is the gruntfile.js located? In the root of the VS project or elsewhere? Would you be able to share your project or a smaller repro project so we can take a look and fix it?
    • Hi have the same error like Magnus.
      my gruntfile.js is located in the main Project Folder. for example : solution is in \myapp
      gruntfile is in \myapp\myapp
      my gruntfile looks like this: 
      module.exports = function(grunt) {
          // load the task
          // Configure grunt here
               * Compile all TypeScript files to the Application JavaScript file
              ts: {
                  dev: {
      // a particular target
                      src: ["app/**/*.ts"], // The source typescript files, http://gruntjs.com/configuring-tasks#files
                      html: ["app/**/*.html"], // The source html files, https://github.com/basarat/grunt-ts#html-2-typescript-support
                      reference: "./app/reference.ts", // If specified, generate this file that you can use for your reference management
                      out: 'app/app.js', // If specified, generate an out.src file which is the merged src file
                      watch: 'app'
          grunt.registerTask("default", ["ts:dev"]);
      so nothing Magic and it works in a console not through Task runner. if you want i can share small part of my Project with you. just say where to send this? 
      best regards 
    • I am having the same issue - getting the following error:
      Failed to load "C:\TFS\...\gruntfile.js"...
      'grunt' is not recognized as an internal or external command,
      operable program or batch file.
      The gruntfile is in the root of the project, along with the project file. However, could it be that there are multiple projects in the solution? The solution file is in a different location.
      Another thought is that we are running Node.js, NPM, NoGit, and Grunt via Nuget packages that run locally to the project - not a global installation. Could that be a cause?
    • According to my findings, you need to have grunt.cmd in your PATH for Task Runner Explorer to work. This is not required for Grunt Launcher. Launcher seems to pickup the grunt.cmd from the .bin folder. 
    • I found an issue where VS would completely hang during solution open if a task was set to be executed during solution open, and grunt.loadNpmTasks was called more than 11 times (12 caused VS2013.4 to hang). This was reproducible on all machines, and apparently wasn't a specific NPM module. 
      The workaround was to use a grunt module called "load-grunt-tasks" like so:
1 - 10 of 79 Items