Home > ALM, TFS, TFS2012 > TFS2012: Installed and Configured TFS, What’s next? Part 2

TFS2012: Installed and Configured TFS, What’s next? Part 2


About TFS Blog Series

This blog post is part of a blog series to introduce Team Foundation Server to new users. The blog series will also contain articles targeting intermediate and expert users.  I will be using Team Foundation Server 2012 Update 1 and Visual Studio 2012 Update 1 throughout the series. If you have any questions or you want me to cover a specific topic, please don’t hesitate to contact me.

Expertise Level

Beginner

Introduction

In this post I am using TFS2012 Express but the article applies to the full version TFS and the TFS Service editions. One of the common questions I get from users who are new to TFS is what should they do after they install and configure Team Foundation Server. This post is a continuation for the first part which can be found here

You must create a workspace to be able to use Team Foundation Server for version control. A workspace is a container that acts as a bridge between the Version Control Repository and the computer where the code gets view, modified, and/or compiled.

The workspace keeps track of the downloaded files version, pending changes, checked out files, locked files, the mapping between the server and the client. The workspace also detects conflicts when trying to check files back into the repository. Moreover, when a user tries to get the latest code, the workspace sends only the new and the modified files instead of all files in the version control repository. Hence, it improves and optimizes the network traffic between the server and the client.

Team Foundation Server has two types of workspace. You can have a Server workspace or Local workspace. To avoid reinventing the wheel, you can read more about the deference between them here.

Permissions

You need to be part of the Valid Users group to be able to create a workspace.

Creating a Workspace

The first time you connect to your team project. TFS creates a workspace for you. The created workspace, however, is not fully configured.

The following steps explains how to create a workspace in TFS using Visual Studio:

Click on Source Control link in Team Explorer.

image

Notice that a workspace has already been created and it was called “WINDOWS8” which is the same name as you my computer name in this case. In case that workspace name already exist, it will be post fixed with the underscore character and the next available number after 0. In other works, if the a workspace with the name WINDOWS8 already existed, the workspace name would have been WINDOWS8_1. The default created workspace is a Local Workspace with private permissions for the current logged in user. The following figure show the default configuration.

image

 

The fastest way to configure the newly created workspace is by following these steps

Select the Root node (Collection).

Click on the Not mapped.

Type or Select the path for the folder where your code will be downloaded.

It is best to choose a folder on the first level after the drive letter (e.g. C:\sc, d:\sc, …etc) to avoid hitting the maximum 255 character path on your drive.

image

Notice on the above diagram, that there are two type of folders: Server and Local. The server path starts with $ sign and the local folder starts with the drive letter.

Click on the Map button.

You should get notified to get the latest code.

Click Yes

image

 

image

Notice that the Local Path link is updated.

image

Because I am using the local workspace (default for VS2012 with TFS2012), I have a hidden folder called $tf which is the local workspace on my hard drive.

image

In the next post I will cover other ways create a workspace and why you may need to create other workspaces.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: