Workspaces in TFS, Best practices

How to create new workspace in TFS, how to use them and how to check out projects from TFS?

If you have TFS (Team Foundation Server) installed, Open Visual Studio 2012 and go to

  1. File > Source Control>Advance>Workspaces. A dialog popups. Click add workspace, type in name of the new space
  2. Select the workspace and click edit button. Set the local path as well are remote path.Best practice is, Remote path should be the root folder where all projects are sitting. Local path should be empty folder preferably sitting in the root folder such as c:Projects
  3. The local folder has been mapped. Now TFS will ask you to check out the project (a dialog box will popup). Select no at this point. Selecting yes will force to check out everything in the root folder which you may not want.
  4. In Visual Studio 2012, go to Team Foundation Server, click on home button then “Explore Source Code”. Now select the folder you want to check out and select get latest. You can select a folder embedded in the root folder. That will check out the folder you selected as well as its complete path. This way your local copy of the repository has the same exact path as on the Server.

Workspaces is a wonder way to fix issues in builds. For example you have a workspace which you are working in. Suppose someone checked in the code that broke the build. Now you can create a second workspace as guided above and check out the same project. Open the new project in a new Visual Studio. You will spot the bug right away without breaking your existing code (which might work fine).

This entry was posted in Software Development, TFS. Bookmark the permalink.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s