Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

Task Runner Explorer: Unexpected behavior with Gulp Watch task bound to Project Open #373

Open
scottaddie opened this issue Jan 17, 2016 · 4 comments

Comments

@scottaddie
Copy link
Member

scottaddie commented Jan 17, 2016

I created a new ASP.NET 5 (RC1 Update 1) StarterWeb project using VS 2015 Update 1. I then added the following watch task to gulpfile.js:

gulp.task("watch", function () {
    gulp.watch([paths.css, "!" + paths.minCss], ["min:css"]);
    gulp.watch([paths.js, "!" + paths.minJs], ["min:js"]);
});

Next, I bound this "watch" task to Project Open and closed the solution. I opened the solution back up, and noticed 2 "watch (running)" tabs opened in TRX:

watch_task

Why are there 2 tabs/running instances? I would've expected just 1.

Next, I unloaded the project in Solution Explorer via the "Unload Project" context menu item and the reloaded it via the "Reload Project" context menu item. The "watch" task ran again, and I now had 3 tabs/running instances:

watch_task_after_reload

Why didn't the previous 2 tabs close upon unloading the project?

The "watch" task should be terminated when unloading the project.

@sayedihashimi
Copy link
Contributor

TFS Bug#231174

@jongunter
Copy link

I'm having this issue, too. I use a Git source control program outside of VS2015. Every time I switch to a different branch and the project reloads, a new "watch" task (which is bound to project open) starts up and the old one is not closed.

If a dev switches branches several times during the day, it's very possible that 8 "watch" windows could be running if they forget to close them. That can cause performance issues on some machines

This is a pretty big issue, considering MSFT is pushing everyone towards a gulp/grunt based bundling/minification workflow now. I'm a little frustrated that this new workflow feels like it's so half-baked within the VS Tooling.

@MikhailTymchukDX
Copy link

@jongunter Yes, same for me. And sometimes previous watch task is killed and don't respawn at project open.

@webtools-bot
Copy link

The GitHub Issue Tracker for the aspnet/Tooling repo is being deprecated in favor of Visual Studio's Report a Problem tool.

If this issue is still a problem with the RTW release of Visual Studio 2017, please report a new issue using the Report a Problem tool. While you can still use .NET Core and ASP.NET Preview tools with Visual Studio 2015, Visual Studio 2017 is now the officially supported tool for developing .NET Core and ASP.NET Core projects.

By using the Report a Problem tool (available in both VS 2017 and VS 2015), you can collect detailed information about the problem, and send it to Microsoft with just a few button clicks. See Visual Studio's Talk to Us page for more details.

Please use the discussion topic here for feedback and questions on the deprecation of this issue tracker. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants