tfs-sdk

List Source Control Files and Folder under a given TFS Path (without work-space mapping)

耗尽温柔 提交于 2019-12-04 18:41:55
I'm redesigning a control that lists the contents (files and folders) under a given TFS path. The tricky part is that I don't want to create a workspace for achieving this, as my intention is just to list the contents and display the history of a selected item. The current implementation creates a local workspace mapping in the background to achieve this, is this needed? Can I attain this without a local workspace mapping? Thanks Joe. Use GetItems , which does not require a workspace. For example: TeamFoundationServer tfs = new TeamFoundationServer("http://tfs:8080/tfs/DefaultCollection");

How to use LIMIT keyword as using in ms sql by WIQL to query TFS workItem

六眼飞鱼酱① 提交于 2019-12-04 08:06:07
I'm working on TFS API, I don't know that TFS API have any things like LIMIT keyword or no.I need it for paging. Thanks There is nothing equivalent to the SQL LIMIT keyword in TFS WIQL, you will need to implement the paging yourself. One approach would be to retrieve all the results on the first access, and cache them and page them yourself. Another approach would be to dynamically construct the WIQL query each time your user pages. For example: Run a WIQL query to return just the work item ID's that match the query. SELECT [System.Id] FROM WorkItems WHERE <conditions> Cache that list of IDs

TFS: Query for builds containing a specific changeset

左心房为你撑大大i 提交于 2019-12-04 07:47:13
I have a number of build definitions that get executed based upon a single branch in TFS (eg Main). I'd like to (somehow) query TFS to find all builds containing a specific changeset number that I supply, and return a list of string of the names of the builds that TFS contains. Any kind of app (VS extension, CLI app, winforms, whatever) will do. Note: this isn't a 'plz give me the code' request; I'm willing to hoof it and do serious work on this. Any pointers to documentation on how to query the database or SDK, or an example of how to query builds; just some place to start looking would be

How to get the History of the sourcecontrol in TFS API?

时间秒杀一切 提交于 2019-12-04 04:37:19
问题 I'm new using the TFS API, I'm writting an app who delete my team projects, but before I delete I want to know the last time was merged I mean the info that appear in Source Control Explorer > "Sample Project" > view history, and put into a textbox. Also the info of the last time a user entered the project. 回答1: I Don't know how to check when was the last time a user connected to the project, but this how you can access the source control history from code, using Microsoft.TeamFoundation

Programmatically add new iteration in TFS

人走茶凉 提交于 2019-12-04 03:38:35
问题 I can manually add a new iteration to a team project in TFS by right clicking on the project and going to Team Project Settings > Areas and Iterations > Iterations tab. Is there an example out there of how to do this programmatically using their API? Thanks! 回答1: Does this tutorial solve your problem? http://blogs.microsoft.co.il/blogs/shair/archive/2009/01/30/tfs-api-part-10-add-area-iteration-programmatically.aspx Google-Fu "tfs api add iteration" From glancing at his code, (and using TFS)

TFS - VS Extension: Add work item to pending changes via API

六月ゝ 毕业季﹏ 提交于 2019-12-04 02:29:56
问题 I am currently working on a VS extension / add-in and I need to associate work items with the pending changes (without triggering a check-in). After searching for some hours I couldn't find a way to accomplish this via the API. The only way I found to associate a work item to the pending changes is Workspace.CheckIn() which also would trigger the check-in.. Do I miss something? Or is this really not possible? 回答1: I have provided the sample code below, Note that, I have not tried this code,

Generate reports programmatically using the TFS API and SSRS

半城伤御伤魂 提交于 2019-12-04 01:18:48
问题 Is there a simple approach in generating reports, either in PDF, Excel, Word or TIFF formats using the TFS API and SSRS? I can generate the reports manually by selecting the parameters from the combo boxes using the SSRS dashboard for TFS but I would like to include an export button to my web application so that I can easily bypass Team Web Access for generating reports. Any ideas? I have read on this post that I could use the ReportExecutionService class from SSRS, so I was wondering if this

TFS API - How to fetch work item(s) from specific Team Project

一个人想着一个人 提交于 2019-12-03 05:35:52
问题 I am trying to query a single team project in the main TfsTeamProjectCollection which contains 194 Team Projects in total. I know exactly how to get a WorkItem by Id from a WorkItemStore . The thing is, that by doing this, the API searches in ALL of the projects in the collection and the query takes about a minute. This is way too slow, there must be a way to query work items directly from a single team project ? Here is the code I have: private Uri collectionUri; private

SpecificVersion=False with TFS API dll's

≯℡__Kan透↙ 提交于 2019-12-02 10:26:42
问题 Our web application makes heavy use of the TFS API. We developed and compiled it with the TFS 2010 API dll's. We also set SpecificVersion=False. The problem is that when we deploy to a server that has TFS 2012 and not TFS 2010, we get the following error: Could not load file or assembly 'Microsoft.TeamFoundation.Client, Version=10.0.0.0,.....etc. The system cannot find the file specified. Any way to migitate this? TFS 2012 is installed into the GAC and the fact we are saying "SpecificVersion

TfsTeamProjectCollection API

血红的双手。 提交于 2019-12-02 09:02:13
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(); 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 through all the project collections on the TFS instance, but with that example code you could examine