public void DeleteATaskGroup() { string projectName = ClientSampleHelpers.FindAnyProject(this.Context).Name; // Get a task agent client instance VssConnection connection = Context.Connection; TaskAgentHttpClient taskClient = connection.GetClient <TaskAgentHttpClient>(); // Delete the already created task group taskClient.DeleteTaskGroupAsync(project: projectName, taskGroupId: this.addedTaskGroupId).SyncResult(); }