tfs-sdk

Multi Value control on TFS 2017 U3 on-premises after upgrade

怎甘沉沦 提交于 2020-01-25 07:38:05
问题 We upgrade our TFS test environment from 2015.1 to 2017.3 . We have Multi Value control in our Work Items, after the upgrade the Work Item form was empty (unless the tags), and the error on the console was about the multi value control. I downloaded the Multi Value extension from the market place, but is only for the new form (WebLayout), and we not want to move to the new form yet. I go to Legacy Extensions and disable the old multi value control extension, and now we the work item is appear

Is there a way to add tags programmatically to TFS Work Items?

荒凉一梦 提交于 2020-01-23 17:38:38
问题 I want to be able to mass update work items with a certain tag programmatically. Is there currently a way to do this? I've checked the workitem class and have seen that there is a tags property that is readonly. Is there another way to accomplish this through code? Best, Michael 回答1: Editing of Tags through the API and Excel is supported as of 2013.2. I would recommend that you update to the latest version of TFS to get that and tones of other fixes. As mentioned by Brian Harry: Work Item

Clone VSTS Build Definition in C#

隐身守侯 提交于 2020-01-15 07:45:10
问题 I'm using BuildHttpClient's .GetDefinitionAsync and .CreateDefinitionAsync to clone a VSTS Build Definition. This works fine but I'd like to create the build defs in a different folder, other than the root folder of the project. I can add a folders via the "Manage Folders" link web but how can I do this programatically? I've tried the following: buildDef = JsonConvert.DeserializeObject<BuildDefinition>(json); buildDef.BuildNumberFormat = buildNumFormat; buildDef.Name = newBuildDefName; Uri

Azure Devops - Get release definitions by agent pool ID

大憨熊 提交于 2020-01-14 10:36:08
问题 I'm trying to find all the builds and releases that are configured to use a specific agent pool, using the .NET Client Libraries. Assuming agentPoolId , I can get all the build definitions like this: // _connection is of type VssConnection using (var buildClient = _connection.GetClient<BuildHttpClient>()) { List<BuildDefinitionReference> allBuilds = await buildClient.GetDefinitionsAsync(projectName, top: 1000, queryOrder: DefinitionQueryOrder.DefinitionNameAscending); List

TFS2015 REST API Build definition update

三世轮回 提交于 2020-01-11 09:52:21
问题 I'm trying to update a build definition through REST API with PowerShell. The script used is: $url = "http://tfs:8080/tfs/collection/project/_apis/build/definitions/$($buildId)?api-version=2.0" $obj = Invoke-RestMethod -Uri $url2 -Method Get -ContentType "application/json" -UseDefaultCredentials $json = ConvertTo-Json $obj Invoke-RestMethod -Uri $url -Method Put -Body $json -ContentType "application/json" -UseDefaultCredentials First I've tried with a new empty definition and I've got the

Show Test result Form test suites using TFS api

偶尔善良 提交于 2020-01-11 05:36:09
问题 I am working with a school project where I am going to analyse a companies defect database. They are using Microsoft Foundation Server (TFS). I am all new to TFS and the TFS api. I have some problem in getting the right data from TFS using the TFS Client Object Model . I can retrieve all Test Plans, their respective test suites and every test case that a specific test suite uses, but the problem comes when I want to see in which test suite I have a specific test result from a test case. Since

Access the Kanban Column (a Team-Specific Field) for a Work Item

久未见 提交于 2020-01-11 01:28:08
问题 Is there a way to programmatically access the "Kanban Column" for a WorkItem using the TFS 2012 API? Using the Scrum 2.2 template, the history of a Bug or Product Backlog Item shows "[MyProject\MyTeam] Kanban Column" as a changed field whenever a work item is dragged between Kanban columns on the Board, but the field is not accessible when specifically retrieving a work item through the TFS API. It also shows up as a changed field in the WorkItemChangedEvent object when implementing the

Programmatically delete a TFS branch

亡梦爱人 提交于 2020-01-05 07:43:25
问题 I want to programmatically delete a branch in TFS that was create automatically. There is an existing method "ICommonStructureService.DeleteBranches" that should do the work. My problem is that the method requires a parameter "string[] nodeUris" that specifies the branch to delete using a "vstfs://... " URI and I just don't know how to get that for my branch. What I need is something like: var projectCollection = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri

How to use LIMIT keyword as using in ms sql by WIQL to query TFS workItem

早过忘川 提交于 2020-01-01 10:58:10
问题 I'm working on TFS API, I don't know that TFS API have any things like LIMIT keyword or no.I need it for paging. Thanks 回答1: There is nothing equivalent to the SQL LIMIT keyword in TFS WIQL, you will need to implement the paging yourself. One approach would be to retrieve all the results on the first access, and cache them and page them yourself. Another approach would be to dynamically construct the WIQL query each time your user pages. For example: Run a WIQL query to return just the work

Determine in which branches a changeset in present

百般思念 提交于 2020-01-01 06:26:14
问题 I need to programmatically track changesets: determine in which branch a changeset is currently located. Update: Let's say we got three branches for a project: Dev, Test and Release. Whenever we're ready to go live with some changesets, we first merge them to Test, and then to Release as soon as the testing is done. I need to know where a given changeset is located in this workflow ( only in Dev OR in Dev + merged in Test OR in Dev + merged in Test + merged in Release ). It's already possible