Gulp tasks with typescript are not detected by visual studio task runner

46 views Asked by At

I have created gulpfile.ts folder and placed index.ts in there.

For VS Code:

It works nicely with VS Code as I have

  • registered this task as a npm script
  • made my build task dependsOn this gulp task

Problem with Visual Studio 2022 Task Runner.

It only detects task in gulfile.js and not typescript tasks. How do Visual Studio Task Runner can see tasks in gulpfile.ts folder.

Already Tried

I have tried the JS version and it works fine with bindings on top of file.

I am also doing a workaround for now and not using Task Runner instead in proj file I have placed a <Taregt beforeTargets="PreBuildEvent"> element that contains one line to execute the npm run my-script and that is doing the job of running it every build.

If my workaround is the only or newer option please let me know.

0

There are 0 answers