Download Project from TFS online With .NET C#


Adaptive Code

I have been working with implementing an custom automated build server project with C#. The requirement is to download the source code from a Team foundation server online to a local drive and do some code manipulation on it, package it and deploy it to an Azure cloud service.

The first step is to download the code from the TFS online in to an local workspace. It was pretty simple through C# .net.

Pre-Requisites

  1. Visual Studio Online Account (With a project created :))
  2. .Net framework on you local computer

I have created a sample project for the testing. The first step is to add the required references. I have added the following references to the project.

  1. Microsoft.TeamFoundation.Client
  2. Microsoft.TeamFoundation.VersionControl.Client

Following is the code for the download.

 using System; using System.Linq; using System.Net; using Microsoft.TeamFoundation.Client; using Microsoft.TeamFoundation.VersionControl.Client; namespace TFSDownloader { class Program { static void Main(string[] args) { var tfsUrl = "<TFS…

View original post 182 more words