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

TFS file compared to physical file - encoding issue?

I'm trying to write code that will compare a TFS file (web page) to a physical file on our web server to make sure they match. I have code like this that extracts the file from TFS into a streamreader object: (simplified example) Dim TFSContents as…
kt1
  • 59
  • 1
  • 1
  • 3
0
votes
1 answer

Cannot get specified changeset

I am working on a build controller ot assist in the management of builds and deployments. In this process, it is necessary for me to specify the changeset number for the build. In the Build Configuration, when doing this manually, it is identical to…
JamieMeyer
  • 386
  • 3
  • 14
0
votes
2 answers

Error in checkout and checkin files in TFS programatically despite having permissions

I want to programatically connect to TFS and be able to checkout and checkin the files. For that purpose, I am using the following code (some private information omitted), however, I get the "not having sufficient permissions error", I have checked…
Vinay Pandey
  • 1,129
  • 3
  • 16
  • 33
0
votes
1 answer

PowerShell Script to Build TFS Definition

I am trying to create a PS script to create TFS build definition files. I found below example. But, it's not working properly. I tried to follow the example and create a script without any success. Any help in identifying why below script is not…
user1636380
  • 79
  • 1
  • 9
0
votes
0 answers

WstxIOException "Invalid UTF-8 start byte" while downloading files using TFS SDK

I use TFS SDK for Java and randomly get this exception while downloading files from the server: com.ctc.wstx.exc.WstxIOException: Invalid UTF-8 start byte 0xab (at char #6473861, byte #6473740) Has anybody faced it before? Any ideas? The full…
Sergey Podobry
  • 7,101
  • 1
  • 41
  • 51
0
votes
1 answer

Adding TFS Group, AD groups and setting permissions in powershell

I am trying to automate the process of creating the TFS groups and adding the AD groups to it and permissions. I was able to create the tfs group and add the AD groups to it. Now I need to do the same at the project level and at different branch…
0
votes
1 answer

Remove a specific suite through TFS API

I'm trying to delete a specific test suite through TFS API with now success. IStaticTestSuite suite = suite_entry.TestSuite as IStaticTestSuite; if (suite != null) { IStaticTestSuite newSuite = destinationSuite.Project.TestSuites.CreateStatic(); …
ekrako
  • 169
  • 1
  • 11
0
votes
2 answers

Listening to TFS Work item state change using C# window service

I am working on a project where i need to sync data (tickets) from help desk department to TFS and vice-a-versa. i am able to add item in TFS using windows service and its running fine. but, Whenever a work item's status is change in TFS, i want to…
SoftSan
  • 2,482
  • 3
  • 23
  • 54
0
votes
1 answer

TFS workitem cross-validations is possible?

I am trying to do extensive validation of work items in TFS2010. I understand that validation can be done using the out-of-box rules given by Microsoft, however I am looking to do more advanced validations. For example, 1)Sprint Planning should not…
Saha
  • 5
  • 2
0
votes
1 answer

TFS api list collection nodes

I am trying to list the project collections of a tfs server. I am only connected to one of the three collections and I am using this method : ReadOnlyCollection collectionsNodes = configurationServer.CatalogNode.QueryChildren( …
user1594047
  • 181
  • 1
  • 1
  • 12
0
votes
1 answer

How to programmatically get newly created build definitions in TFS?

Currently I am querying the build definitions by project and getting all of them. My code (simplified) looks something like the following var server = new TfsTeamProjectCollection(new Uri("url")); server.EnsureAuthenticated(); var buildServer =…
Tanmoy
  • 44,392
  • 16
  • 45
  • 55
0
votes
1 answer

GetService throws an error: "Could not find a part of the path 'E:\TFSWorkItemTrackingCache\v11"

I am trying to return the WorkItemStore from a TfsTeamProjectCollection instance. The code is straight forward: TfsTeamProjectCollection tfs = new TfsTeamProjectCollection(new Uri(this.Path), new NetworkCredential(this.UserName, pwd,…
user588582
  • 31
  • 3
0
votes
2 answers

How to create new Change Requests using TFS API 2010?

I am new to the TFS API and currently in the process of creating new work items via a windows form app. Can anyone explain in detail with code examples on how to create new Change Requests, Risks and Scenarios for TFS 2010? I was aware that CRs are…
TS.
  • 149
  • 4
  • 16
0
votes
1 answer

How to delete a specific attachment using TFS api 2010, 2012?

How to delete a attachment in attachments collection using TFS api 2010, 2012. I only know wi.Attachments.Clear(); to delete all attachment.
knowwebapp.com
  • 95
  • 4
  • 16
0
votes
1 answer

IBuildDetail.RequestedFor doesn't get populated after calling QueryBuilds()

I call IBuildServer.QueryBuilds(), and look at the returned IBuildDetails: TFS2010: They are populated with user aliases. TFS2012: They are null. How can I get the user names in TFS2012? var collection = new TfsTeamProjectCollection(new…
Jonathan
  • 6,939
  • 4
  • 44
  • 61