I have a Gulpfile.js in Visual Studio 2015 RC with a single default task. For some reason it is not showing up in the Task Runner Explorer
.
I had added gulp
In the release candidate, editing the devDependencies in package.json
and then saving does not result in the packages being automatically restored/added to the project as I had expected. After saving package.json
the packages were listed under NPM in the Dependencies node in Solution explorer, but with a caption "not installed"
next to the package names. Manually invoking Restore Packages
, as shown in the screenshot, causes Visual Studio to install the pacakges.
After the node modules had been installed the gulp tasks were detected by the Task Runner Explorer
.
I hope this helps someone else.
I had the same problem and no-one of suggested method works for me. After re-installing NPM Task Runner the problem gone away. You can download latest NPM Task Runner from marketplace in following link.
https://marketplace.visualstudio.com/items?itemName=MadsKristensen.NPMTaskRunner
For me, Visual Studio crashed while installing the npm modules and it caused corruption in the npm cache.
I had to clean the cache, delete node_modules, and install again.
Now, open Visual Studio and it should work.
I was also facing the same issue. Just restarted Visual Studio after adding the tasks to gulpfile.js and my problem was solved. All tasks were listed.
Answer taken from another question about gulp, but this worked for me
I had the same problem migrating from VS2013 recently. As Josh noted in his comment here Visual Studio 2015 ships with an older version of node. In case you don't want to get stuck with whatever version of node is built into Visual Studio, you can tell it to use the version you have already installed. Go to Tools > Options > Projects and Solutions > External Web Tools and reorder locations so that $(PATH) is above $(DevEnvDir)\Extensions\Microsoft\Web Tools\External. This also applies to other tools like Grunt, Bower and Gulp.
This is old question but same issue could be faced by VS 2017 users.
I was facing same issue in VS 2017 and mistakenly, I had added gulpfile.js in the sub folder.
Make sure gulpfile.js is in the root folder. gulpfile should be in root folder