Agile Zone is brought to you in partnership with:

Den is a DZone Zone Leader and has posted 460 posts at DZone. You can read more from them at their website. View Full User Profile

So you want to get that TFS-powered project from CodePlex...

01.13.2011
| 11354 views |
  • submit to reddit

CodePlex currently hosts 19845 projects. If you've used CodePlex before, then you probably know that you can get the pre-built library/executable/package if such is provided by the developer. But you can also download the source code. There are a couple of ways to do that, but today I am going to cover the TFS (acronym for Team Foundation Server) part only.

TFS-hosted projects can be obtained through Visual Studio, given that you have Team Explorer installed. If you have Visual Studio 2010 Professional (or higher), Team Explorer is already installed so you don't have to worry about that.

NOTE: For Visual Studio 2008 (except Express editions), you can download Team Explorer here.

The first thing you need to do is open the project of your choice and open the Source Code page. There should be a link called Connection Instructions. Once you click it, you will see that there will be a TFS URL present in the list of possible code sources:

Now that you have the URL, start Visual Studio and in the Team menu, select Connect To Team Foundation Server. Usually, you should see this dialog:

If there are no servers listed (not the case displayed above), click on Servers and add one by clicking on Add and entering the connection details. You can have multiple TFS connections set up at once.

Once the server is added, before connecting and getting the source, you need to provide proper CodePlex credentials. If you have developer rights, you will, of course, be able to check out the files you are working on. Otherwise, you will only be able to check in existing projects.

Depending on the collection where the actual project is located, you might want to navigate through those that are available to your user account.

Once you select the project(s) you want to get, click Connect and you will see that each selected project will be listed in the Team Explorer window:

Double click on Source Control and you should see a new tab opened that will show the folder structure for the project you selected:

Right-click on the project you want to get. To download the latest source code release, click on Get LAtest Version. Of course, you can get a different changeset. For that, select the Get Specific Version option and search for the changeset you need.

You will now have to map the remote folder to a location of your own. This is where the local copy will reside, so make sure you know where you are downloading:

Once you select one, all linked project files will be downloaded:

Once this process is complete, you are ready to work. This article only outlines the basic procedures and there is much more to Team Explorer than what is showed here. Here is some recommended reading for you to get better acquainted with some of the work practices.