tfs-sdk

Is there a way to create a new team project using the TFS SDK?

I'm just getting started with the Team Foundation Server SDK and I'm wondering if there is a way to create a new Team Project using the SDK. My goal in doing this is to create some automated tests to aid in system validation (being an FDA regulated company we are required to validate our in-house tools, to the extent this can be automa...

Get .sln file from Team Foundation Server SDK

I'm writing a check-in policy for Team Foundation Server, and would like to know if there's any way to get the path to the project solution's .sln file with the TFS SDK. Seems like there should be a way, just haven't found it yet--any help would be appreciated. ...

Is it meaningful to store workitem URIs

I'm considering storing the URI for a workitem from our TFS environment in our helpdesk system, however looking at the URIs TFS gives us (vstfs:///WorkItemTracking/WorkItem/327), there doesn't appear any recognition of which team project it is associated with, which makes me wonder how meaningful they are? Is it possible to load a worki...

How to create team projects using TFS 2010 Beta 2 API?

I have recently installed VS 2010 beta2 and trying to execute the File.BatchNewTeamProject command as a process in my application. It worked fine in Beta1 but for some reason, I am getting an error regarding permissions to create new sharepoint sites. I am a member of Sharepoint web application services and Administrators groups. Previ...

Error when triggering a build through the TFS API 2010 Beta 2

Hi I am trying to trigger a build through the TFS API. First, I select the necessary changesets I want, then create a label for them, and then execute a selective build of these changesets. I get the following error message : TFB210503: An error occurred while initializing a build for build definition \Test\Label Changesets: TF14064: C...

add users to team foundation server 2008 using TFS SDK

How to add users to team foundation server 2008 using TFS SDK? I want to add these users to the contributors group of 1 of my team projects. ...

How to build till a particular changeset number TFS API 2010?

Suppose I have a list of changesets 1 to 10. Is it possible to specify that it build till changeset no. 5, instead of building just for a particular changeset or all the changesets 1-10? I know It's possible to specify a particular version of the files to build, like changesetId,Date,Label,latest and workspace versions. So how do I spe...

Invalid list value for State field while adding or editing Bugs in TFS 2010 Beta 2

I am trying to create/edit work items through the TFS API in my Windows application. I get an error "Invalid list value for State field" when I try creating a new Bug itself. The process template has been only slightly modified from the "MSF for Agile Software Development v5.0 - Beta2" process template. \ Shouldn't it accept "Active", "...

How to determine programmatically whether team project has sharepoint portal configured?

In VS.Net 2010 Beta 2: when a team project gets created the wizard offers a choice of whether or not to configure the project's Sharepoint portal. How can I determine programmatically whether a team project has a portal configured. Thank you in advance for any help. ...

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

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 th...

Use VersionControlExt.Explorer outside Visual Studio

Hi All, I'm developing a TFS tool to assist the developers in our company. This said tool needs to be able to "browse" the TFS server like in the Source Control Explorer. I believe that by using VersionControlExt.Explorer.SelectedItems, a UI will pop-up that will enable the user to browse the TFS server (please correct me if I'm wrong)...

Get latest changeset version number of a file from TFS programatically

Hi All, Using TFS SDK, how can one get the latest version number of a certain file? Right now I'm doing this: VersionControlServer vcs = (VersionControlServer)_tfsServer.GetService(typeof(VersionControlServer)); int LatestVersion = vcs.GetItem(change.Item.ServerItem).ChangesetId; //Get Latest Version of this item However, this appro...

Get all folders from TFS using TFS SDK

Hi All, I am creating a TFS tool that will get "changeset information" from the TFS server. Now, I want to provide a "TFS Browser" so that the user can browse what "branch/folder" he wants to fetch information from. I am using a TreeView control and the GetItems function to get the items' path from TFS: private void treeView1_BeforeE...

custom control for TFS work item type

I will explain my question with an example. Lets consider TFS "Bug" work item type. In the bug work item type there is a "Developer" and "Tester" dropdown. Using the inbuilt rule types we can only assign "VALIDUSER" to each drop down. This displays all the windows user in the drop down. I want to be able to create a custom subteam under ...

In the context of the TFS version control SDK (Microsoft.TeamFoundation.VersionControl), what exactly is deletionID?

In the context of the TFS version control SDK (Microsoft.TeamFoundation.VersionControl), what exactly is deletionID? It is a property of Microsoft.TeamFoundation.VersionControl.Client.Item. It is also a parameter to some of the query methods on Microsoft.TeamFoundation.VersionControl.Client. I'm trying to figure out exactly what it me...

How to get List of projects from TFS?

How do I get list of projects from TFS server using webservice? Is documentation available for the TFS Webservices? ...

Workspace.PendEdit not checking out files

I'm using the TFS 2010 SDK to programmatically check in edits to files into TFS 2010. The documentation on the TFS 2010 SDK is sparse at best. When I call the method workspace.pendedit() passing in an array of files I want to mark as having a pending edit, nothing is actually checked out. So when I call workspace.checkin() passing in wor...

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

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...

Limiting results from TFS WorkItemStore.Query

Is there a way to limit the amount of workitems that gets returned from WorkItemStore.Query? workItemStore.Query("Select Title from Issue where (State = 'Active') order by Title") <-- returns quite a few results. For what I'm doing I only want the first 5 results. Using a query like "Select TOP 5 ID, Title from Issue where (State = 'A...

listing all contents of a folder in tfs

Given a particular path of folder in tfs, I need to recursively find all files and folders within the folder for a given changeset. In other words, i need to get the transitive closure of a path in tfs for a given changeset. The problem I'm facing in doing so is listing the contents of a particular folder within tfs.. How would this be p...