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

Selecting DISTINCT rows using 'Work Item Query Language' WIQL

I am querying a list of all IterationIDs and their corresponding IterationPath. The following code works and produces a long list with several repeated rows: WorkItemCollection queryResults = workItemStore.Query( "Select…
Kyle Williamson
  • 2,251
  • 6
  • 43
  • 75
0
votes
2 answers

TFS API Pulling changesets of a certain IterationId

I am trying to pull work item information from Team Foundation Server. I have a working program that pulls all WorkItems. I am attempting to only pull WorkItems that belong to a specific iteration (IterationId). One way to do this that I have…
Kyle Williamson
  • 2,251
  • 6
  • 43
  • 75
0
votes
1 answer

C# Get the work items in a TFS Kanban column

I am trying to write a small C# app that will give a notification when a work item gets dropped from the "Doing" column into the "Done" column in my TFS Kanban board but i cannot get the query right. Could someone please help me with extracting this…
Yub Nub
  • 21
  • 2
0
votes
1 answer

Value of type 'Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer' cannot be converted to 'System.Type

I'm working on a custom TFS Build workflow based on the code found in two blogs: http://www.theringworx.com/blog/?p=494 https://lajak.wordpress.com/2011/08/30/tfs2010-retrieve-associated-workitems-to-changesets-tfs-api/ When I implement the VB.Net…
bsumner
  • 68
  • 8
0
votes
2 answers

Unable to call correct .NET overload when passing string[]

I have a method I'm trying to call from powershell, it's Workspace.GetPendingChanges(string[] items) Of this method there are multiple overloads, but the ones making my life hard are: Workspace.GetPendingChanges(string items) …
jessehouwing
  • 106,458
  • 22
  • 256
  • 341
0
votes
1 answer

TFS Plugin - Preventing Work Item saving if certain logic restrictions haven't met

We're trying to calculate parameters in TFS server side plugin. I'm trying to restrict users from moving PBI into Committed state unless all of their child Tasks have value under the "remaining work" field. This basic logic works, i can go through…
Totem
  • 1,030
  • 7
  • 16
0
votes
1 answer

Add groups and users from Active directory to TFS programatically

We can add programmatically users and groups to TFS, and add AD users/groups in TFS using administrative context for a team project. But can I add groups with users from the Active Directory to the TFS collection programatically? I'm working on the…
K. Alex
  • 33
  • 1
  • 1
  • 5
0
votes
1 answer

TFS API VS2010 - How do I set the comment on a workitem revision?

I've been beating my head against the wall and can't figure this out. I would post an image to help show you what I mean, but I'm a newbie ;)
HartyeTech
  • 181
  • 5
0
votes
3 answers

Get TFS version programmatically

How can I get the TFS version programmatically? I am trying to get the version that shows up in the TFS Administration console. I tried the following code, but it returns the server version as "Server Version: Dev14.M89-Part7", that doesn't seem…
Tarun Arora
  • 4,692
  • 4
  • 30
  • 40
0
votes
2 answers

Is it possible to use TFS 2015 api to QueryHistory changesets from TFS 2010?

I'm performing a migration of TFS 2010 team projects to TFS 2015 by using the TFS API. I'm running into an issue when attempting to call VersionControlServer.GetLatestChangesetId() and VersionControlServer.QueryHistory(...). I am using the nuget…
Aaron Palmer
  • 8,912
  • 9
  • 48
  • 77
0
votes
1 answer

Unable to Run my Code on Windows Server 2012 X64 as Windows Task

Let me give you some background what I'm trying to achieve before I call out the problem. Use TFS API to Get Services Work Item. Get all the Open Bugs. Write in excel all the Open Bugs (from step2). Send step3 Excel as Attachment through…
0
votes
1 answer

Unable to upload attachments to testresult using TFS API

I am trying to upload attachments using TFS API Following is the code snippet : result.State = TestResultState.Completed; result.RunBy = identity; var attachment = result.CreateAttachment(logFilePath); …
0
votes
1 answer

How to filter TFS contributors to a specific project?

Currently I can get all of the TFS contributors using workItemStore.FieldDefinitions[CoreField.AssignedTo].AllowedValues, but the thing is that I want to search for the allowed members of a specific project(I already have the project info extracted…
Phantomazi
  • 408
  • 6
  • 22
0
votes
0 answers

connecting to TFSAPI using C#

I get the following error when connecting to tfsapi using c#.I have the right credentials, url and added the dlls Microsoft.TeamFoundation.Client from C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\ReferenceAssemblies\v2.0 &…
CodeNinja
  • 3,188
  • 19
  • 69
  • 112
0
votes
1 answer

Cannot create link between WorkItem and Server object in TFS 2012

I'm trying to create a link from a work item to the current server version of a file in TFS via the API. I can do it within Visual Studio (2012) so I know it's possible. However when I try and do it via code it fails with TF201038: Linked item does…