I have a gulp file that has 2 tasks in it 1. deletes *.html files from a directory 2. copies *.html files to a directory
I have Visual Studio 2017's Task Runner Explorer setup so that:
If I run the tasks from Visual Studio 2017's Task Runner Explorer they work
WhenI do a Visual Studio 2017's Publish, the Task Runner Explorer events are not firing. How can we get them to fire on Publish?
Not sure, why it is not working on publish. It's always special.
As an alternative you can exectute gulp explicitly on publishing. For doing this, open your publishing profile (Properties/PublishProfiles/profile.pubxml
) and modify it:
<Target Name="BeforeBuild">
<Exec Command="gulp myTask" WorkingDirectory="$(ProjectDir)" />
</Target>
Also make sure, you have installed gulp-cli via package.json or by running the following command, if not already done:
npm install -g gulp-cli
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With