tfs-sdk

TFS API - How to get a Team's Adminstrator?

依然范特西╮ 提交于 2019-12-01 01:45:23
I'm trying to programmatically retrieve a Team's Administrator Users . For example in a setup like in the picture how can I get 'Billy' as being the Administrator of Team 'QC Manager'? I already have the code that gets all users in a Team via IIdentityManagementService's ListApplicationGroups, getting the group using FirstOrDefault ... and then getting its users via ReadIdentities. I've done some poking around in the Team Web Access assemblies, and this seems to be only available on the server side at the moment (no Rest or Client Object Model option available). The code looks like this:

TfsConfigurationServer.GetService<VersionControlServer>() always returns null

一个人想着一个人 提交于 2019-12-01 01:40:14
问题 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, CredentialCache.DefaultNetworkCredentials); // or var tfs = new TfsConfigurationServer(servers.First()); both always returns null: var vc = (VersionControlServer)tfs.GetService<VersionControlServer>(); // null! What should I do? 回答1: You don't want the configuration

TFS API - How to get a Team's Adminstrator?

岁酱吖の 提交于 2019-11-30 21:15:34
问题 I'm trying to programmatically retrieve a Team's Administrator Users . For example in a setup like in the picture how can I get 'Billy' as being the Administrator of Team 'QC Manager'? I already have the code that gets all users in a Team via IIdentityManagementService's ListApplicationGroups, getting the group using FirstOrDefault ... and then getting its users via ReadIdentities. 回答1: I've done some poking around in the Team Web Access assemblies, and this seems to be only available on the

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

烈酒焚心 提交于 2019-11-30 19:17:09
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 Transitions via the API. Soooo..... Not many people need the transitions for WorkItemTypes. Well, I needed it so I wrote a method to do it. Here it is in case someone else ever needs this: // Hold a list of all the transistions we have done. This will help us not have run them again If we already have. private static Dictionary<WorkItemType, List

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

Deadly 提交于 2019-11-30 19:04:19
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 information). The closest piece of information I found is to use the TeamFoundationServer (String, ICredentials) constructor, however I cannot find any information for a suitable class that interfaces with the ICredentials interface (especially since it seems to not be using the System.Net ICredentials but a TeamFoundationServer specific ICredentials). Does

Custom Check in policy in TFS?

廉价感情. 提交于 2019-11-30 16:22:37
We have some xml files in the our project and whenever we check-in these xml files into TFS, We have make sure before checking-in that we have added those xml files to proprietary application. Now the new employees more often forget to add files into proprietary application before check-in and this is getting serious... We want kinda confirmation dialog (a reminder) asking the developers if they have added the xml files into the app. If yes then check-in otherwise keep it checkedout... Please suggest if such thing is possible and any relevant code or links will be really appreciated. It's not

How to get specific version of folder from tfs without creating a workspace?

感情迁移 提交于 2019-11-30 05:06:10
I would like to get the source code of a project at specific time (changeset). So I need do download whole folder. I would like to do it for different times and handling a different workspace is not very convenient. I know about TFS Get Specific Version into separate folder (with workspace) and Need command to get a file from TFS without a workspace (one file). Is there some solution for whole folder without creating a new workspace? Edit I have found the accepted answer too ambitious. I needed something more simple. Assumptions: I can access TFS from Visual Studio on my computer I want to get

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

杀马特。学长 韩版系。学妹 提交于 2019-11-30 03:35:42
问题 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 information). The closest piece of information I found is to use the TeamFoundationServer (String, ICredentials) constructor, however I cannot find any information for a suitable class that interfaces with the ICredentials interface (especially since it

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

Deadly 提交于 2019-11-30 03:30:58
问题 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 Transitions via the API. 回答1: Soooo..... Not many people need the transitions for WorkItemTypes. Well, I needed it so I wrote a method to do it. Here it is in case someone else ever needs this: // Hold a list of all the transistions we have done.

TFS API: GetLocalWorkspaceInfo always returns null

依然范特西╮ 提交于 2019-11-30 02:59:09
On one of my machines, I get a return value of null from any GetLocalWorkspaceInfo call. I have isolated to problem to where it even fails for this simple program: namespace WorkstationTest { using Microsoft.TeamFoundation.VersionControl.Client; class Program { static void Main() { string workspaceLocalPath = @"C:\Dev"; var info = Workstation.Current .GetLocalWorkspaceInfo(workspaceLocalPath); // info is always null here } } } What I have already checked: The exact same code works on my other machine the way it should. I have verified that I have a workspace at C:\Dev I have created a new