Questions tagged [tfs-sdk]

This tag is used to identify questions about the use of the Azure DevOps / TFS API, in any supported language, and any tools that support or build upon it. There are different APIs available. The REST API is the newer API. The older set of APIs consists of the Client Object Model, the Server Object Model and the Build Process Object Model. For .NET there are the .NET client libraries implementing clients for all these APIs.

This tag is used to identify questions about the use of the Azure DevOps / TFS API, in any supported language, and any tools that support or build upon it.

There are different APIs available. The REST API (https://learn.microsoft.com/en-us/rest/api/azure/devops) is the newer API. The older set of APIs consists of the Client Object Model, the Server Object Model and the Build Process Object Model (https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2013/bb130146%28v%3dvs.120%29).

For .NET there are the .NET client libraries implementing clients for all these APIs (see https://learn.microsoft.com/en-us/azure/devops/integrate/concepts/dotnet-client-libraries).

569 questions
9
votes
2 answers

Specifying a list of items for the parameters with WorkItemStore.Query in TFS

I've got the following WIQL query for a TFS project: string query = "SELECT * FROM Issue WHERE [System.TeamProject] = @Project "+ "AND [Assigned To] IN (@AssignedTo)"; Dictionary parameters = new Dictionary
Chris S
  • 64,770
  • 52
  • 221
  • 239
9
votes
1 answer

Return newly created TFS work item ID using TFS API?

Using the TFS API, I am able to create a TFS item, no problem. What would be the best way for me to know what the Item ID is for the newly created Item? Thank you, George try { // Authenticate User Account …
ElMatador
  • 557
  • 1
  • 6
  • 15
9
votes
3 answers

How do you connect to a TFS server in C# using specific credentials?

I am attempting to write a c# application that connects to TFS and retrieves work item information. Unfortunately, it seems like all examples of using the TFS SDK are using the default credentials for the current user (i.e. my domain login…
KallDrexx
  • 27,229
  • 33
  • 143
  • 254
9
votes
3 answers

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

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…
JoeGaggler
  • 1,207
  • 1
  • 13
  • 28
9
votes
1 answer

Alternative to TfsTeamProjectCollectionFactory.GetTeamProjectCollection taking ICredentialsProvider

According to the MSDN the method GetTeamProjectCollection(RegisteredProjectCollection projectCollection, ICredentialsProvider fallbackCredentialsProvider of the TfsTeamProjectCollectionFactory class is now deprecated: "Note: This API is now…
gabrielmaldi
  • 2,157
  • 2
  • 23
  • 39
8
votes
3 answers

Get the latest check in number (latest changeset id)

Is there a way to get programmatically latest changeset version in general. It's fairly easy to get changeset id for certain file : var tfs = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("https://my.tfs.com/DefaultCollection")); …
Jacob
  • 914
  • 2
  • 10
  • 30
8
votes
1 answer

How to retrieve list of child tasks from a Product Backlog Item in TFS API?

Given a certain product backlog id, I want to programmatically retrieve a list of tasks that are child to the PBI. I am aware that there's not one field in the task that says "Parent PBI Id". I have a version of code that is working, but that's…
Padu Merloti
  • 3,219
  • 3
  • 33
  • 44
8
votes
1 answer

TfsConfigurationServer.GetService() always returns null

I'm trying to connect to TFS 2010 using TFS SDK, but can't get VersionControlServer service. var servers = RegisteredTfsConnections.GetConfigurationServers(); // ok then var tfs = new TfsConfigurationServer(servers.First().Uri,…
abatishchev
  • 98,240
  • 88
  • 296
  • 433
8
votes
0 answers

Writing code to find a Shelveset associated with a CodeReview Request work item

I am new to C# (coming from Java) and am trying to write a report that counts the number of code reviews done. I have no trouble iterating through the code review requests. When a code review is associated with a changeset, I use the following code…
Larry Freeman
  • 418
  • 6
  • 19
8
votes
2 answers

Programmatically query permissions on a Git repository hosted on TFS

I have been trying to figure out method of fetching permissions on a particular Git Repository programmatically. The TFS API reference given online doesn't detail any of the security API's. However, this is definitely done in TFS when you or view…
Hamid Shahid
  • 4,486
  • 3
  • 32
  • 41
8
votes
2 answers

How to get history of checkins/changsets for specific Team Project?

I'm using the TFS Client API to try and query a TFS 2010 instance. I need to be able to do the following For a specified team project, say 'Project A' Get a list of the history of recent check-ins made to this project (say the last 50, or the list…
AbAkt
  • 317
  • 2
  • 10
8
votes
1 answer

TFS API - is there a way to get a list of the transitions for a workitem type?

I am trying to get from State "A" to State "X". There are transitions in place that prevent me from just going to X. I can export the WorkItemType as XML and work on that, but before I do that, I thought I would ask if there is a way to get at the…
Vaccano
  • 78,325
  • 149
  • 468
  • 850
8
votes
1 answer

Is the XML passed to TFS build event subscribers stored in TFS DB?

I have set up a custom build event handler for TFS 2012 builds via the SOAP web service option. This handlers works nicely and is built to work with the XML payload that TFS gives us. I am now trying to build a web page that can show similar…
sohum
  • 3,207
  • 2
  • 39
  • 63
7
votes
3 answers

TFS 2010 API, determine which build server a build is running on.

Apologies, this is almost certainly a duplicate of this question but as that one hasn't been answered I'm going to try again. I'm trying to build a tool which will allow me to see all of the builds either Queued or Running on TFS. One of the…
James Reed
  • 13,873
  • 51
  • 60
7
votes
2 answers

Listing All Changesets and Releated Work Items Belongs to Specific Project Between Specified Dates

I am trying to write a small Relase Notes program with C#. I need to fetch all changesets and related work items belongs to specified project between specified dates. I tried to use QueryHistory method but i couldn't find how could i give date…
bahadir arslan
  • 4,535
  • 7
  • 44
  • 82
1
2
3
37 38