In visual studio 2017, in an attempt to add SASS compilation using Gulp to a netcore2 project using this tutorial I ran into trouble with the Task Runner Explorer. On the project I want to add gulp to, the Task Runner does not display any task.
If I try to add a Gulpfile.js to an other netcore 2 project, that it be older or newly created, I can see some tasks from the bundleconfig.json and an empty task list for the Gulpfile.js.

On all of these projects I have an identical gulpfile.js which is as follow:
/*
This file is the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. https://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require('gulp');
var sass = require('gulp-sass');
var paths = {
webroot: "./wwwroot/",
sass: "./wwwroot/scss/",
css: "./wwwroot/css/"
};
gulp.task('scss', function ()
{
return gulp.src(paths.sass + '/**/*.scss')
.pipe(sass().on('error', sass.logError))
.pipe(gulp.dest(paths.webroot + 'css/'));
});
gulp.task('watch', function ()
{
gulp.watch(paths.sass + '**/*.scss', ["scss"]);
});
I can run the gulp jobs using the PowerShell command line and they properly compile my scss, which means the gulpfile.js is valid.
As per other Stack Overflow questions/answers I tried:
- installing Gulp both locally and globally, no change src src2.
- adding an external tool that targets
nodejssrc
- adding the
npm task runnerVS2017 extension - adding the
Bundler & MinifierVS2017 extension - restarting VS2017 a few dozens of time in total, mostly in between each of the above steps/attempts
- running
npm installseveral times - taking the project out of the solution folder in which it was src
Regarding the lines without a src I could not find the thread that said to try this particular fix, but I did try it.
None of the above fixed it. Has anyone run into this problem and fixed it in an other way than the ones described above ? Does anyone know why this happens and what I'm doing wrong ?
