Task Runner Explorer

Microsoft DevLabs Free

Provides custom task runner support to Visual Studio.

(23) Review
Visual Studio
2013
Download (27,293)
2/10/2015
0.7
View
E-mail Twitter del.icio.us Digg Facebook
Add to favorites
Description
Reviews (23)
Q and A (72)
Sign in to write a review
Sort by:

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:

http://www.codecadwallader.com/2015/03/15/integrating-gulp-into-your-tfs-builds-and-web-deploy/

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

Justin

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 |
Delete

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,
Leo

Mads Kristensen September 19 2014
| Edit |
Delete

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 |
Delete

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.

by Kenneth Brubaker | September 05 2014

When I talked with Mads at the 2012 Build, he said they hadn't "wrapped their heads around" tools such as Grunt and libraries such as Angular. That was frustrating given the seamless integration that WebStorm had...

Well, now! Consider them wrapped! Good show, guys, good show. Now bring it home with VS14 and Monaco.

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


  • TRE not even showed up on the right click menu
    2 Posts | Last post Wed 3:48 PM
    • 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) {
        grunt.loadNpmTasks("grunt-ts");
        grunt.loadNpmTasks('grunt-notify');
        grunt.loadNpmTasks('grunt-contrib-watch');
        grunt.loadNpmTasks('grunt-contrib-clean');
      
        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 = [];
        defaultTasks.push('clean:core');
        defaultTasks.push('ts:core');
        defaultTasks.push('watch:core');
      
        grunt.initConfig(config);
        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
          grunt.loadNpmTasks("grunt-ts");
      
      
          // Configure grunt here
          grunt.initConfig({
              /**
               * 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 
      Adrian
    • 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:
      require('load-grunt-tasks')(grunt);
  • standard streams in console problematic?
    8 Posts | Last post May 18, 2015
    • I tried to use testem in dev mode in Task Runner Explorer and it failed saying "Fatal error: Implement me. Unknown stdin file type!" 
      
      Running the same command in the standard command prompt worked fine.
    • I should have mentioned that running testem in dev mode writes a console-based interface that the user interacts with.
    • Task Runner Explorer appears to not be able to do anything with stdin. 
      
      I have been trying to use a NPM grunt module that contains a reference to "process.stdin". Even though stdin is never used, I still get the same error message: "Warning: Implement me. Unknown stdin file type! Use --force to continue."
      
      I was able to get around it for my problem by forking the module and creating my own. The code was
      
        grunt.util.spawn({
            cmd: 'mongoimport',
                args: args,
                opts: {
                    stdio: [
                        process.stdin,
                        process.stout,
                        process.stderr
                    ]
                }
              })
      
      Instead I wrote the following and everything worked.
      
        grunt.util.spawn({
            cmd: 'mongoimport',
                args: args,
                opts: { stdio: 'inherit' }
              })
      
    • I've encountered this problem with grunt-shell. Setting the option "stdin: false" fixed it in that case. I think that's something that should be taken care of by TRE itself, as there are probably many grunt/gulp plugins that don't provide that option.
    • I get the same issue trying to run the HotTowel app from TRE - it runs fine from an actual command line
      
      For more on running HotTowel on command line:
      http://www.johnpapa.net/get-up-and-running-with-node-and-visual-studio/
      
      The closest I can come to applying the fix talked about is updating stdin: false in the default.js file - but it doesn't work:
      C:\HotTowelApp\node_modules\gulp-nodemon\node_modules\nodemon\lib\config\defaults.js
      
    • btw, I am using VS 2015 RC
      and by commenting out lines in run.js & nodemon.js that refer to process.stdin, I can get it work, but, wow, what a bad kludge
    • 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:
      require('load-grunt-tasks')(grunt);
      
    • Sorry for replying to the wrong thread :-( It was meant to be helpful to others.
  • Typescript tasks being reset on save
    1 Posts | Last post May 05, 2015
    • I am using a typescript gulpfile
      
      The "/// <binding AfterBuild='default' />" gets added to the javascript, /not/ the typescript, so when I edit my typescript gulpfile and save, the binding gets deleted.
      
      Putting the header in the both the ts/coffeescript file as well as the js file would likely solve the problem.
  • vs2013 task runner explorer does not detect gruntjs tasks
    1 Posts | Last post May 05, 2015
    • Here is a snippet from my gruntjs file in a vs2013 web project. What I am seeing is adding the last line in the initconfig to load the settings stops showing the tasks in the VS2013 Task Runner Explorer. As soon as comment out that line the Task Runner Explorer enumerates my tasks. There are no errors in the output window for the Task Runner ExplorerI .
      
      I can run my gruntfile.js fine using the grunt cli.
      
      
      grunt.initConfig({
      
              pkg: grunt.file.readJSON('package.json'),
              target: grunt.config.get('target'),
              settings: grunt.file.readJSON('config/' + grunt.option('target') + '.json'), //problematic line
      karma: {
                  unit: {
                      configFile: 'karma.conf.js'
                  }
              },
  • Start background node.exe process at a lower priority
    1 Posts | Last post May 01, 2015
    • Currently, the background node process that's started by TRE seems to default to "normal" priority, which at times causes "freezes" or delays for other running applications when active. It would be great if it would default to a lower priority (e.g. low/idle), or some option could be given for that to be set.
  • Shortcut
    1 Posts | Last post April 27, 2015
    • Any one know if you can set up the task runner explorer, so that a a keyboard shortcut can be set for a task?
  • Doesn't work if the project is in a solution folder.
    2 Posts | Last post April 27, 2015
    • The Task Runner wont find projects with a gulp file if those projects are inside a Visual Studio Solution Folder. If you move your project out of whatever solution folder you have it in and drop it at the root of your solution (in Visual Studio Solution Explorer), then all will be cool after school.
      
      Hope that helps someone.
      
      https://msdn.microsoft.com/en-us/library/vstudio/sx2027y2%28v=vs.100%29.aspx
    • Hi NotBuzzAldrin, 
      
      Is there any solution to this? I am using Visual Studio 2013. Thanks. 
  • Is this open source?
    1 Posts | Last post April 20, 2015
    • I really like this extension for VS 2013 work and will love it being embedded in 2015.  However, I have been experimenting with "just using NPM" to run tasks instead of Grunt/Gulp.  Does this extension support this or could the community contribute such functionality?
  • TRE uses built in node?
    1 Posts | Last post April 06, 2015
    • It looks like TRE uses VS's built in node in:
      "\Common7\IDE\Extensions\Microsoft\Web Tools\External\node"
      
      Is there a way to change it other than replacing the node there?
1 - 10 of 72 Items