Describe the bug
Binding a task to Before or After Build no longer works.
To Reproduce
Steps to reproduce the behavior:
- Create a task.
- Right-click the task, select Bindings > Before Build. The task will now appear in the Binding list. However, the binding does NOT appear in the commands.json file.
- In Task Runner Explorer, click the Refresh button. The Task now disappears from the Bindings list.
- ALSO... When manually entering the binding in the commands.json file, such as: "-vs-binding": { "BeforeBuild": [ "MyTask" ] }, the task does NOT get executed before a build, or at any time during a build.
Expected behavior
I expect a task that it bound to remain in the list, be placed in the commands.json file, and to execute during the appropriate build step.
A Workaround
As a workaround I've added my task to the build process in the .csprog file. This does execute the task during build.
Example:
<Target Name="RunMyTask" BeforeTargets="Build">
<Exec
Condition="Exists('$(MSBuildProjectDirectory)\package.json')"
WorkingDirectory="$(MSBuildProjectDirectory)"
Command="cmd /c npm run MyTask" />
</Target>
Describe the bug
Binding a task to Before or After Build no longer works.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expect a task that it bound to remain in the list, be placed in the commands.json file, and to execute during the appropriate build step.
A Workaround
As a workaround I've added my task to the build process in the .csprog file. This does execute the task during build.
Example: