Skip to content

'There is no task provider registered for tasks of type "cargo".' in VS Code code-workspaces #9093

@oeed

Description

@oeed

In version 0.2.620 & 0.2.621 Cargo tasks configured using a VS Code .code-workspace file appear to not be working; rolling back to 0.2.612 does not have this issue. The workspace does have multiple root folders.

When attempting to run one I get an error notification stating: There is no task provider registered for tasks of type "cargo".
the following is shown also shown in the 'Tasks' output:

Error: The cargo task detection didn't contribute a task for the following configuration:
{
    "type": "cargo",
    "command": "build",
    "problemMatcher": [
        "$rustc"
    ],
    "group": "build",
    "label": "in .code-workspace"
}
The task will be ignored.

.code-workspace configured as such:

{
  "tasks": {
    "version": "2.0.0",
    "tasks": [
      {
        "type": "cargo",
        "command": "build",
        "problemMatcher": [
          "$rustc"
        ],
        "group": "build",
        "label": "in .code-workspace"
      }
    ]
  }
}

Strangely tasks work fine from a tasks.json file though.

{
  "version": "2.0.0",
  "tasks": [
    {
      "type": "cargo",
      "command": "build",
      "problemMatcher": [
        "$rustc"
      ],
      "group": "build",
      "label": "in tasks.json"
    }
  ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions