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
4
votes
1 answer

TFS API BranchObjectCreated Event does not fire

I have some code to automate the creation of build definitions in TFS. Now I'd like to have this code invoked whenever a branch is created. Looking at the API, I see that there is a BranchObjectCreatedEvent in…
bitsprint
  • 897
  • 1
  • 11
  • 19
4
votes
1 answer

TFS SDK: Query yesterday's builds

I can query for all builds within a TeamProject as follows: var bServer = teamProjectCollection.GetService(); IBuildDetail[] builds = bServer.QueryBuilds("myTeamProject"); This yields all builds within the given myTeamProject. But…
pantelif
  • 8,524
  • 2
  • 33
  • 48
4
votes
1 answer

VssResourceNotFoundException: API resource location is not registered on {tfs url} - c#

I am trying to get the build information of a collection using BuildHttpClient. But it is throwing VssResourceNotFoundException: API resource location {GUIS} is not registered on http://tfsserver/tfs The following code sample produces the error: …
karz
  • 41
  • 3
4
votes
1 answer

Team Foundation Server 2018 API Build Definition Error

I am trying to create a new build definition through REST API using Powershell 5.1. My script consist of some files. In my script I have this: File 1: $newDefinitionUrl =…
fr0zt
  • 733
  • 4
  • 12
  • 30
4
votes
3 answers

TFS 2010 API - Iterating through list of changesets returned in QueryHistory is way too slow

Long story short. After profiling, this command takes 0,1% of the processing var ChangesetList = TFSConnection.GetInstance().GetVersionControl().QueryHistory (Path, VersionSpec.Latest,0, RecursionType.Full, "", null, VersionSpec.Latest,…
Conrad Clark
  • 4,533
  • 5
  • 45
  • 70
4
votes
1 answer

Is ISubscriber still supported in TFS2018?

Up to TFS 2017 there was a library in Plugins folder called Microsoft.TeamFoundation.Framework.Server it contained ISubscriber interface which one could override in order to attach hooks and add behavior for events such as build completed or new…
Paweł Zarzycki
  • 306
  • 3
  • 7
4
votes
2 answers

In TFS 2010 is there any equivalent to reporter (or a way to change the "Created By" field)

When adding a work item to TFS 2010 via the SDK, the incidents are created using the same identity that was used to authenticate to the TFS server. In other applications providing defect tracker/work item support the API normally allows you to set a…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
4
votes
2 answers

Adding items to a global list in TFS via the SDK

I wish to add or list items from a global list in TFS 2010 via the TFS SDK. I have discovered the following methods: XmlDocument WorkItemStore.ExportGlobalLists() void WorkItemStore.ImportGlobalLists(XmlElement listsElement); void…
Bittercoder
  • 11,753
  • 10
  • 58
  • 76
4
votes
2 answers

In the context of the TFS version control SDK (Microsoft.TeamFoundation.VersionControl), what exactly is deletionID?

In the context of the TFS version control SDK (Microsoft.TeamFoundation.VersionControl), what exactly is deletionID? It is a property of Microsoft.TeamFoundation.VersionControl.Client.Item. It is also a parameter to some of the query methods on…
Frank Schwieterman
  • 24,142
  • 15
  • 92
  • 130
4
votes
1 answer

Query if my workspace has the latest files using the TFS Api

I want to programmatically find out if a workspace has the latest files. I don't want to do a Workspace.Get(), because that performs the equivalent of "Get Latest". I just want to know if my workspace needs a "Get Latest" or not. I'm doing this…
MRothaus
  • 45
  • 4
4
votes
2 answers

How can a Gated check-in be triggered programmatically?

I am getting errors using the Workspace.Checkin command in TFS because the files I am trying to check in are part of a Gated build definition. There are lots of people asking how to override a gated check-in using the TFS API. But a very different…
paulyphonic
  • 854
  • 1
  • 6
  • 15
4
votes
0 answers

Get latest changeset version number of a file from TFS programatically

Using TFS SDK, how can one get the latest version number of a certain file? Right now I'm doing this: VersionControlServer vcs = (VersionControlServer)_tfsServer.GetService(typeof(VersionControlServer)); int LatestVersion =…
Ian
  • 5,625
  • 11
  • 57
  • 93
4
votes
1 answer

How to add a new TFS 2012 work item from external app

I am looking for an example or link to resources that would explain how to add a new work item to TFS 2012 from an external app. I have read that TFS 2012 has web services that allow third-party apps to interface with it. I have been researching…
user31673
  • 13,245
  • 12
  • 58
  • 96
4
votes
1 answer

TFS 2012 API : Unable to add Test Point to Test run

I'm trying to use the TFS API to update test results from automation run separately. I've tried the suggestions from other questions here (particularly How to create a test run and result using the Team Foundation Server API?) as well as from…
Kate Paulk
  • 383
  • 8
  • 18
4
votes
1 answer

Determine in which branches a changeset in present

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…
user356178