自定义构建任务未被删除

Custom build task is not deleted

我正在尝试使用 tfx-cli 删除构建任务。

C:\Users\Work>tfx build tasks list
TFS Cross Platform Command Line Interface v0.4.11
Copyright Microsoft Corporation

id            : 122d5ad0-61a1-11e6-b9c1-5b12bd371fa9
name          : VersionAssembly
friendly name : Version Assembly
visibility    : Build
description   : Update the assembly version number to match the build number
version       : 1.0.9

我现在有了任务 ID。

C:\Users\Work>tfx build tasks delete --task-id 122d5ad0-61a1-11e6-b9c1-5b12bd371fa9
TFS Cross Platform Command Line Interface v0.4.11
Copyright Microsoft Corporation

Task 122d5ad0-61a1-11e6-b9c1-5b12bd371fa9 deleted successfully!

但即使在 Ctrl+F5 刷新之后,任务仍然显示在 TFS 中:

运行 delete 命令再次显示相同的内容。成功。不是 "Can't be found," 或类似的东西。

如何摆脱这个讨厌的家伙?

我能够通过 REST 删除任务 API:

$Credential = Get-Credential
$Headers = @{ "Accept" = "application/json; api-version=2.0"; "X-TFS-FedAuthRedirect" = "Suppress" }
$Uri = "http://hostname:8080/tfs/_apis/distributedtask/tasks/122d5ad0-61a1-11e6-b9c1-5b12bd371fa9"

Invoke-RestMethod -Credential $Credential -Headers $Headers -Uri $Uri -Method Delete

根据 Jesse Houwing 的建议,我的理论是因为它首先是用 API 创建的(我在上面的评论中的回忆是不正确的),它也必须用 API.