Version Control Walkthrough (TFVC) Part 1 – Create a new local workspace

This walkthrough series is a companion for the TFVC gems guidance, which aims to provide an insight and practical guidance on how to use Team Foundation Version Control (TFVC) features, such as workspaces, merging, and new features. Using Visual Studio, we will create a new local workspace and will explore its operation in both online and offline modes. We will then investigate the functionality of the diff and merge tools and then finally dive into the new Code Lens feature.

Prerequisites

Environment set-up

Please note, that this contains information about configuring custom environments for use with this Hands-On Lab if and only if your environment does not include an instance of the FabrikamFiber solution as used on ALM Rangers Base VMs or Brian Keller’s VMs (https://aka.ms/almvms).

This Hands-On Lab uses a team project called FabrikamFiber containing the FabrikamFiber.CallCenter solution within a Dev folder. You can download the FabrikamFiber sample solution from the Visual Studio ALM Rangers Supporting Guidance and Whitepapers site on CodePlex at https://vsarguidance.codeplex.com. Download the sample and follow the installation instructions provided.
image

If you are using the Visual Studio 2013 ALM Virtual Machine from Brian Keller, you will already have the project files but will be required to remove workspaces mappings as they are already setup when you first login.

This Hands-On Lab does not use any specific features of the FabrikamFiber sample solution. If the FabrikamFiber sample is not available, you can use our sample solution which can be found on CodePlex (Version Control (formerly the Branching and Merging) Guide) and make appropriate allowances when following the steps.

Create a new local workspace

Connect to Team Foundation Server

  • In Team Explorer click on Select Team Projects
  • Select the server localhost, If a server doesn’t currently exist for localhost add a new server to the location https://localhost:8080/tfs
  • Choose FabrikamFiberCollection
  • Check FabrikamFiber
  • Click Connect.

Create the local workspace

  • In Team Explorer, click the Source Control Explorer link.
  • At the top of Source Explorer, select the Workspace drop down and then Workspaces.
  • Select the working folder by clicking on Edit
  • Under Working folders click Click here to enter a new working folder
  • Click the ellipses (…), expand localhost\FabrikamFiberCollection
  • Expand FabrikamFiber
  • Expand Dev
  • Select FabrikamFiber.CallCenter and click OK
  • Click in the space directly underneath Local Folder and click the ellipses (…)
  • Navigate to and select the folder c:\hol\Dev (create this folder if it does not already exist), and click OK 
     image
  • Click OK and click Yes when prompted that the workspace has been modified
  • Finally, click Close.

 

Next up: Version Control Walkthrough (TFVC) Part 2 - Use the local workspace in online mode


Please send candid feedback!

image

We need your candid feedback. Here are some ways to connect with us:

  • Add a comment below.
  • Contact us on our blog.

References


A special thank you to everyone who laid the foundation this and ither version control guidance: Anil Chandr Lingam, Bijan Javidi, Bill Heys, Bob Jacobs, Brian Minisi, Clementino de Mendonca, Daniel Manson, Jahangeer Mohammed, James Pickell, Jansson Lennart, Jelle Druyts, Jens Suessmeyer, Krithika Sambamoorthy, Lennart Jansson, Mathias Olausson, Matt Velloso, Matthew Mitrik, Michael Fourie, Micheal Learned, Neno Loje, Oliver Hilgers, Sin Min Lee, Stefan Mieth, Taavi Koosaar, Tony Whitter, Willy-Peter Schaub, and the ALM Community.