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
3 answers

Get test outcome/result using TFS API

Using the TFS API, how can I get the outcome/result of a specific test case in a given test suite and plan? With outcome/result I mean the value that tests are grouped by in MTM: Passed, failed, active, in progress or blocked
Oskar
  • 7,945
  • 5
  • 36
  • 44
4
votes
1 answer

Cannot get a list of valid users in TFS for AssignedTo field while creating new Workitems via API

Hi I am trying to create new workitems via the TFS API and this is the method I have used below to get a list of valid users who can be assigned workitems. Somehow, it gives me a null reference exception on validUserSids line. Anyone know what's…
TS.
  • 149
  • 4
  • 16
4
votes
1 answer

Get the URL of the WebAccess for a TFS Team Project programmatically

I want to get the URL of the web access Page for a specific TeamProject. I found some samples using a TswaClientHyperlinkService object calling GetHomeUrl(new Uri("MyprojectName")), but I was not able to provide a correct Uri value for that. Maybe…
ulfgebhardt
  • 125
  • 1
  • 8
4
votes
2 answers

TFS Force Get programmatically via SDK

I can't figure out any way to force get a file from TFS programmatically. My current code: _workspace.Get(new GetRequest(serverPath, RecursionType.None, new DateVersionSpec(dateTime)), GetOptions.Overwrite); The above code will get a specific…
NYTom
  • 524
  • 2
  • 14
4
votes
1 answer

Get latest method always re-downloading

I'm using TFS SDK and I have a method which allows to get latest versions of projects. But when I was call method, it always re-downloading files. This also takes a long time. I tried that, I get changeSet and I compare particularly items. If item…
mozkarakoc
  • 269
  • 6
  • 14
3
votes
1 answer

Carriage Returns in ITestActionResult.ErrorMessage

I am using the TFS API 2010 to insert several error messages into a ITestActionResult. If I do this with the TestRunner (Add Comment) and read the field (ErrorMessage) with the API the string looks like this: "Line1\r\nLine1\r\n"... If I set the…
Stel Zy
  • 31
  • 1
3
votes
1 answer

Querying failed unit tests from TFS-SDK?

Given a TFS build detail (IBuildDetail) with .Status of PartialSuccess, and .TestStatus of Failed how might I go about retrieving the list of tests (MSTest) that have failed on that build? I have a working sandbox in which I can contact TFS via the…
el2iot2
  • 6,428
  • 7
  • 38
  • 51
3
votes
1 answer

C# TFS API "There is no working folder C:\TFS' in VS2008 installed system

I want to find out the files recently checked in using C# and TFS API from TFS2010. It works fine where MS Visual studio 2010 is installed. this is developed using VS2010, .Net 3.5. When I use this exe in system having VS2008 installed throws…
Anand Kumar
  • 395
  • 2
  • 7
  • 18
3
votes
2 answers

How to get all unmerged changesets for a branch using TFS 2010 SDK?

Currently I have 2 branches - Development and Release. Is it possible to obtain all unmerged changesets from Development to Release? Currently we use the default Merge Wizzard. However it has one big limitation - it cannot filter by user. So I was…
Kiril Stanoev
  • 1,865
  • 2
  • 20
  • 33
3
votes
1 answer

Detecting the Team Project Collection in Team Foundation Server 2010

I'm using the Team Foundation Server API to try to connect to a remote server. From within my application, I try to connect to a URL of the form https://some-tfs-location.example.com/tfs but when doing so I get an error TF50309 (discussed here). If…
Jeff Foster
  • 43,770
  • 11
  • 86
  • 103
3
votes
3 answers

How to add users programmatically to TFS

I want to add users programmatically to a Team Project. What I found out to be the solution was this: IGroupSecurityService gss = (IGroupSecurityService)objTFS.GetService(typeof(IGroupSecurityService)); Identity identity =…
Leslie
  • 105
  • 1
  • 2
  • 4
3
votes
2 answers

TFS discard not working on rollback changesets

We have a situation where work had been done in the trunk of our system but was then pulled for our next release. We created a branch with the changes still in the trunk and then rolled back the changes in the trunk only. What that's left us with…
swingdoctor
  • 1,551
  • 2
  • 11
  • 18
3
votes
2 answers

Custom TFS queries via the API

I have a working utility that queries the TFS workitem store via the TFS API. I can retrieve various pieces of data in this way including listing the Stored query names. However, I can't find the location of Custom Queries. Can anybody point me in…
Kevin Roche
  • 367
  • 1
  • 11
3
votes
3 answers

Clone VSTS Build Definition in C#

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…
Tom
  • 162
  • 8
3
votes
1 answer

TFS API InformationNodeConverters.GetAssociatedChangesets() not working as expected

I think I may have misunderstood the purpose of this function, but here's my problem. When I look in the build summary, I see that a build ran successfully, and it tells me: [person] triggered [build number] ([project]) for changeset 123456 I have…
Paul Michaels
  • 16,185
  • 43
  • 146
  • 269