Tutorial: How to get this going

Coordinator
Oct 1, 2008 at 2:01 AM
Edited Oct 2, 2008 at 4:13 PM
It took me a bit to figure this thing out, so I decided I'd do a quick write-up on how to connect to our Team Foundation Server and actually work with the source code. A future discussion will be about "best practices" when working with the code.  This is really messy, but I just wanted to hurry up and get it out in case there were any problems getting it to work.  If anyone needs anything clarified, just let me now.
 Note: These instructions are based on Visual Studio 2008. It shouldn't be too much different if you're using 2005, though.

1) Install Visual Studio Team Explorer
        The Team Explorer software can be downloaded by following the links in the "Source Code" tab. The download is nearly 400 MB and is an ISO file, so you'll need to either burn it to a disk or use something like MagicDisc or Daemon Tools to mount it as a virtual drive. If you are running Parallels or VMWare on a Mac, this functionality is built right in.

2) Install ASP.NET MVC Preview 5
http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=16775

        If you haven't already, take this time to go ahead and install the MVC framework for ASP.NET. You can get it from the downloads section as http://www.asp.net There is a chance we'll be using this, it is a very small download, and it will help in the long run.

3) Load up Visual Studio
        Once you load up Visual Studio, it will look mostly the same. We're going to proceed with a few steps that will change that.

        Gather the server info from the Team Explorer tab on the Source Code page. In Visual Studio, click Tools, and you should see an option that says Connect to Team Foundation Server. Click it.

        Once the Connect to Team Foundation Server window appears, click Servers... to bring up the Add/Remove Server window.
        
        Click Add. Using the server name and port provided, add the server. Make sure to remember to choose HTTPS as the protocal.

        After you click OK, it will pause for a moment while it locates the server. The familiar network login window will appear and ask for your username and password.
        Make sure you use the username given in the Team Explorer tab. The password is the same as for Codeplex.

        The server should now appear in the list. Click Close.

        The Connect to Team Foundation Server window should look a bit more interesting now.  Unless you've gone around and added other Codeplex projects, you should see one project, the tallytab one. Click the checkbox beside it and chose Open.

        You're now connected to the Team Server.

4)  Finding your way around
        Once you connected to the server, one of two things happened. Either a Team Explorer pane popped up, or a new tab labeled Team Explorer was added where your Solution Explorer is.  It is up to you, but I drug my Team Explorer pane over to the Solution Explorer window when it didn't go there automatically, so it would show up as a tab.
    
        In the Team Explorer window, you will be able to click the + sign beside tallytab and get some project information. The most useful thing in this window is the ability to create and update issues and bug tickets and have those be reflected on the Codeplex site. This window is slightly confusing, because you'll never see code here. This is just the "team" side of it. We're going to get to the code part.

5)  Pulling down the source
       All this Team Server stuff doesn't matter if we can't actually use it. To pull down a solution., click File, choose Source Control, and choose Open from Source Control.

       Your computer will think for a bit and pull up the Open form Source Control window.  From here, double click tallytab, then Initial Test Checkin, then tallytab, then choose the solution file. You will need to choose a local path to store the files in. I usually leave this as the default Projects folder in my Documents folder. You'll still need to manual choose it, though.

            Once you open the source file, there server will copy all the files over to your computer and place them under source control. This means you can open the solution as you would anything else on your computer and it will know it is under source control.  At this point, you can work on the files.

6)  Playing around
    Now that you are set, you can commit changesets. Feel free to go through and play with the files and make little changes (like to those in the Views folder, since they are mostly HTML). When you make a change, a little window at the bottom will show up and offer to let you check-in your changes. Once you do, we'll all see the result when we check-out a new copy.

7) Adding things to source control

    Whenever you create a new project from now on, you'll be given the option to add it to Source Control.  When you do this, you'll be presented with all the projects you have commit rights to on the Team Foundation Server that you have defined (the only one in our case is the Codeplex site). Within this project, you'll be able to see existing source code folders and create new ones. For our sample project, I simply created a new folder called Inital Test Checkin and placed the project in there. As we actually build, we'll create a different folder and use that. Notice that the project got placed within another subfolder. Feel free to create more sample projects within the Initial Test Checkin to get the feel of the system.  There is no way to simply delete source using TFS, nor can we do a simply rollback without going through some command prompts. All of our play projects will always be there, but they will not affect anything as long as we keep them confined to the Initial Test Checkin Folder (or any other folders you create in there).