Skip to content

Bindings no longer work. #59

@graymatter00

Description

@graymatter00

Describe the bug
Binding a task to Before or After Build no longer works.

To Reproduce
Steps to reproduce the behavior:

  1. Create a task.
  2. 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.
  3. In Task Runner Explorer, click the Refresh button. The Task now disappears from the Bindings list.
  4. 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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions