tfs-sdk

Specifying a list of items for the parameters with WorkItemStore.Query in TFS

时光怂恿深爱的人放手 提交于 2019-12-21 09:18:23
问题 I've got the following WIQL query for a TFS project: string query = "SELECT * FROM Issue WHERE [System.TeamProject] = @Project "+ "AND [Assigned To] IN (@AssignedTo)"; Dictionary<string, object> parameters = new Dictionary<string, object>(); parameters.Add("Project","test"); parameters.Add("AssignedTo","'chris','tfsuser'"); WorkItemStore.Query(query, parameters); This is being run via the .NET TFS API. My problem is with the AssignedTo parameter. How is this meant to be specified? I've tried

TfsTeamProjectCollection API

♀尐吖头ヾ 提交于 2019-12-20 07:14:06
问题 I'm using the TFS API to connect to Team Foundation Server. In the Server URI , I'm passing the hostname of the server. Me getting a Bad URI format error. teamFoundationServer = new TfsTeamProjectCollection(new Uri(this.Server,UriKind.Absolute), this.Credentials); teamFoundationServer.EnsureAuthenticated(); 回答1: I think you need the URL of the Team Project Collection, not just the server, probably: http://server:8080/tfs/collection There is an example of connecting on MSDN but it iterates

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

坚强是说给别人听的谎言 提交于 2019-12-20 03:30:21
问题 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 thinking of building an app that will pull all unmerged changesets from Development to Release and allow me to filter those changesets by user. 回答1: You could write a small console app that goes like this: using System; using Microsoft

Check-in code into TFS Server by using TFS API

不羁岁月 提交于 2019-12-19 09:43:31
问题 I'm writing c# code to check-in code to TFS server: Workspace WS = VersionControl.GetWorkspace(TeamProject); WS.Map(TFSMapServerPath,LocalWorkingPath); int NumberOfChange = WS.PendAdd(string.Format(@"{0}\Main\DotNet\",LocalWorkingPath),true); PendingChange[] pendingChanges = WS.GetPendingChanges(); WS.CheckIn(pendingChanges,"Auto Check-in"); But i got the error is "No files checked in", all files/folders under LocalWorkingPath are "Pending Change". Are the above codes correct? 回答1: I changed

How to map a TFS item url to something viewable

ぐ巨炮叔叔 提交于 2019-12-19 07:04:09
问题 We are programmatically generating deployment emails, based on the history of changesets and associated workitems since the last deployed build. They look a bit like the build summary info inside Visual Studio (but with many builds combined). There appear to be useful URLs in the data (like vstfs:///VersionControl/Changeset/205151 ), but being new to the TFS SDK I do not if/how this maps to a viewable item (e.g. http:// tfsserver:port/somepath /...). The build summary links inside Visual

TFS 11 2012 API Questions : query capacity and days off

…衆ロ難τιáo~ 提交于 2019-12-18 06:17:21
问题 I need to get several things done with the TFS API. Among those, I have to read the Resource planning information for the sprints of each Project to display in a WPF UI. Tagging along this guide, I now have the following method: private TfsTeamService _teamService; private ICommonStructureService4 _structureService; TeamSettingsConfigurationService _teamSettingsConfigurationService; public void GetUserIterationAssignments(IList<ProjectInfo> projects) { foreach (ProjectInfo project in projects

TFS 2010 API Resources

时光毁灭记忆、已成空白 提交于 2019-12-17 22:42:10
问题 Does anyone have any good resources for working with the TFS 2010 API? I specifically looking at how to create, read, update and delete work items. 回答1: Please see the Team Foundation Server 2010 SDK on MSDN Code Gallery. More content will be coming on-line for the RTM release, but you should find enough there to get you started. Contact me know if you have any questions. 回答2: Shai Ratan's blog has a huge wealth of examples. They're 2008 but 99% still relevant. www.tfsexamples.com has 2008

Passthrough (impersonation) authentication with ASP.NET and TFS api

对着背影说爱祢 提交于 2019-12-17 16:39:29
问题 I'm trying to enable passthrough or impersonation authentication inside an ASP.NET website that uses the TFS2010 API. I've got this working correctly with Cassini, however with IIS 7.5 (Windows 7) something is going wrong. I found this blog post on the subject, and tried the following: private static void Test() { TfsTeamProjectCollection baseUserTpcConnection = new TfsTeamProjectCollection(new Uri(Settings.TfsServer)); // Fails as 'baseUserTpcConnection' isn't authenticated

How do you get the latest version of source code using the Team Foundation Server SDK?

匆匆过客 提交于 2019-12-17 16:06:30
问题 I'm attempting to pull the latest version of source code out of TFS programmatically using the SDK, and what I've done somehow does not work: string workspaceName = "MyWorkspace"; string projectPath = "/TestApp"; string workingDirectory = "C:\Projects\Test\TestApp"; VersionControlServer sourceControl; // actually instantiated before this method... Workspace[] workspaces = sourceControl.QueryWorkspaces(workspaceName, sourceControl.AuthenticatedUser, Workstation.Current.Name); if (workspaces

How to create a test run and result using the Team Foundation Server API?

不羁的心 提交于 2019-12-17 10:43:02
问题 I have found several samples about retrieving test results using the TFS API, but no documentation on creating results programmatically. My aim is to create a lightweight alternative to using Microsoft Test Manager for running manual tests. Does anyone have experience with this? Are there any examples out there that I'm missing? Here's what I have so far: ITestCaseResult CreateNewTestCaseResult(ITestSuiteEntry testCaseEntry) { var run = testCaseEntry.TestSuite.Plan.CreateTestRun(false /* not