Brief about Team Foundation Server - TFS 2013

What is TFS?

According to Wikipedia Team Foundation Server (commonly abbreviated to TFS) is a Microsoft product that provides source code management (either via Team Foundation Version Control or Git), reporting, requirements management, project management (for both agile software development and waterfall teams), automated builds, lab management, testing and release management capabilities.

It covers the entire application lifecycle. TFS can be used as a back-end to numerous integrated development environments (IDEs) but is tailored for Microsoft Visual Studio and Eclipse on all platforms.

Contents:

  1. TFS Requirement
  2. TFS Installation
  3. TFS Project Collection
  4. TFS Team Project
  5. Manage Source Control
  6. Configure Workspace
  7. TFS Settings
  8. Compare
  9. Branching
  10. Merging

TFS Requirement:

TFS installation is supported on a Microsoft Windows server/client OS. Before installation let’s have a review the System requirements for Team Foundation Server

Operation System

  1. Server OS

    a. 64-bit versions of Windows Server 2012 R2 (Essentials, Standard, Datacenter)
    b. 64-bit versions of Windows Server 2012
    c. 64-bit versions of Windows Server 2008 R2 (Standard, Enterprise, Datacenter)

  2. Client OS

    a. Windows 10
    b. Windows 8.1 (Basic, Professional, Enterprise)
    c. Windows 8
    d. Windows 7 (Home Premium, Professional, Enterprise, Ultimate)

SQL Server

  1. SQL Server 2014 ¹ (Express, Standard, Enterprise)
  2. SQL Server 2012

Get a full review here.

TFS Installation:

Microsoft has published a “TFS Install and Administration Guide” in CHM form for download. Here you can go through by clicking the link & get it – TFS Install and Administration Guides.

I am using Windows 10 with SQL server 2014 as installation PC Let’s get into topic step by step.

FIG: 1 Let’s open the tfs server setup file.
setup

FIG: 2 In this step a popup with setup screen will appear, accept the term and click “Install Now”.

popup

FIG: 3 As you can see Installation is in progress.

progress

In our next step we have to choose installation wizard,

  1. Basic wizard

    a. Install the essential service along with SQL express installation.

  2. Advance wizard

    a. Install all installation options.

FIG: 4 we will install using Advance wizard. Click “Start Wizard”.
install

FIG: 5 Advance wizard will popup. Choose “Next”.

Next

FIG: 6 in this step we need to specify a database server, we can also use an existing empty database by specifying a database name. Choose “Next”.

Next

FIG: 7 Here we need to provide a service account as primary account for TFS. Choose an option. In my case I have kept as default(NT AUTHORITY\LocalService) which will authorize on behalf of my account as it does not have a password. Choose “Next”.

Next

FIG: 8 here in “Application Tire” we will configure directory & port for TFS web service. Choose “Next”.

Next

FIG: 9 Locate a folder path for cache TFS resource which will access frequently to increase communication performance. Choose “Next”.

Next

FIG: 10 Tick check box if you want to install a default collection(recommended) in your TFS Server. Choose “Next”.

Next

Overview on creating new collection from here.

FIG: 11 Let’s get a review of our Installing Component. Choose “Next”.

Next

FIG: 12 In this step our system will get validation & need to get passed to conduct installation. Choose “Next”.

Next

FIG: 13 After passing readiness check, configuration process starts. Success message will display after completing all processes. Choose “Next”.

Next

FIG: 14 This is the final step. Review the result here & go to the link to get enabled TFS web services. Choose “Close”.

Close

FIG: 15 Go to > All Apps > Microsoft Team Foundation Server

Server

FIG: 16 TFS Administration Console will run for managing the entire application life-cycle.


run
TFS Project Collection

Team project collection is a group of projects to manage multiple projects from a single location. Let’s start with TFS Administration Console.

FIG: 17 In Team Project Collections, choose Create Collection.

Create

FIG: 18 The Create Team Project Collection wizard opens.

Create

FIG: 19 In Name, specify a name for your collection. Under Description, you can optionally specify a brief description of your collection and its purpose. Choose Next.

Next

FIG: 20 In SQL Server Instance, specify local/remote server name that hosts the database for the collection. Check first option for creating a new database for the collection, if you have existing empty database that was created before you can specify that by checking second option. Choose Next.

Next

FIG: 21 in this step review the settings. Click Verify.

Verify

FIG: 22 In this step show verified status whether the TFS collection is ready to create or not. Click Create.
Create

FIG: 23 the creation process starts.
process

FIG: 24 after completing all required process successfully the wizard finishes, Choose Close.
Close

FIG: 25 As you can see, finally the collection is listed in the console window.

console

TFS Team Project

Let’s open Visual Studio 2013 to connect TFS server. From Visual Studio menu bar Choose [TEAM > Connect to Team Foundation Server] to connect TFS server.

FIG: 26

team

FIG: 27 In Name/URL type Local/Remote URL of TFS server. The default Port is 8080. In this case I have used local PC Name. Click .

OK

FIG: 28 Team Project Collection will appear. Choose desired collection & Click Connect.

Connect

FIG: 29 after connecting TFS click on Source Control Explorer from Team Explorer to view the TFS Project Collection. From Visual Studio menu bar Choose [File> New > Team Project].

New

FIG: 30 specify Name & Description for new TFS Project. Choose Next.

Next

FIG: 31 choose a project template to manage Team project. Choose Next.

Next

FIG: 32 specify a version control setting. Choose Next.

Next

FIG: 33 confirm setting. Click Finish.

Finish

FIG: 34 As you can see finishing status will appear after creating TFS project. Click Close.

Close


Configure Workspace

Workspace is a local copy where we develop & test code. We can manage your workspaces from the Team Explorer. A default workspace created automatically, we can maintain multiple workspace.

FIG: 35 to modify Click Workspace.

Workspace

FIG: 36 to modify existing workspace, Click Edit.

Edit

FIG: 37 Edit workspace window will appear, Click Advanced.

  Advanced

FIG: 38 edit workspace window will appear with advanced option, here we can specify workspace whether its location is Local or Server. Click Ok.

Ok

FIG: 39 Browse source control folder path for working items. Click Ok.

Ok

FIG: 40 Browse local folder path for working items. Click Ok.

Ok

FIG: 41 yes/no prompt will appear with instruction of workspace modification. Choose Yes.

Yes

Manage Source Control

TFS source control is a software configuration management that manage project folder & files of large scale of development component.

To Add item Go to > Team Explorer > Source Control

FIG: 42 add folder structure/file in this step. File/folder will add with a plus icon that indicates item has added to source control. After check-in item the icon will change.


icon

FIG: 43 right click on project collection choose check in pending changes to upload the added file to server.

added

FIG: 44 Pending changes will included in team explorer, add description in comment field while check in. Click Check In.

Check

FIG: 45 right click on main branch choose Add Items to Folder.

Add

FIG: 46 browse desired local file to add to source control. Choose Finish.

Finish

FIG: 47 Double click on project solution that we have added to source control. A configuration warning will appear that ask to bind the solution to source control. Click Yes.

Yes

FIG: 48 Select the project solution then click Bind.

Bind

FIG: 49 as you can see an extra file (.vssscc extension) is added to source control with bind information properties.

properties

FIG: 50 let’s update the pending changes to server. Click Check In.

Check In

FIG: 51 as you can see the files are successfully checked in to the server.

server

FIG: 52 build/rebuild the solution.

solution

TFS Settings

Workspace setting:

FIG: 53 Go to [Team Explorer > Setting]

Setting
FIG: 54 Go to [Team Project Collection > Source Control]

Source Control

FIG: 55 Go to tab [Workspace Setting] choose a default workspace type &
Click Ok.

Ok

Two types of workspace. As you can see from below image,

  1. Local workspace and
  2. Server workspace

With local workspace we can work offline to perform source control operations without going TFS server (Online). Working offline has no option of checkout locks.

The other hand while we are using server workspace there is a checkout lock which prevent working  on single file by multiple users at the same time.

Check-in Policy

In TFS we can add check in policy, while user is going to check in pending changes.

By default, the check-in policy types:

  1. Builds: Requires last successful before a check-in.
  2. Changeset comment policy: Requires comment before check-in.
  3. Testing Policy: Requires tests before check-in.
  4. Work Items: Requires work items to be associated with the check-in.

FIG: 56 Select [Team Explorer > Setting] then Go to [Team Project > Source Control] source control setting window will popup.

popup
FIG: 57 As you can see from the below image in Check out Setting tab enabling multiple check-out checkbox is not selected to prevent working on single files by multiple users at the same time. The other option will ensure that latest file is going to checkout and get updated.

updated

FIG: 58 In the Check in-policy tab we have choose changeset comment policy to ensure that a comment must be provided while the file is going to check-in by user.

user

Compare

TFS has the  facility to compare two files/ single file by changeset to see their differences.

FIG: 59 Go to [Solution Explorer > Compare] like below image.

Compare

FIG: 60 select a type Click Ok.
Ok

FIG: 61 in this window choose find option to compare between changeset.

changeset

FIG: 62 as you can see from below image, the changes of same file with different changeset.

changeset

Branching & Merging

TFS has great facility of branching & merging. In TFS we can create/convert a folder to Branch or Branch to folder.

Branching:

FIG: 63 in TFS we can convert a folder to branch or create a new branch. Go to [Source Control Explorer > Branch and Merging > Convert to Branch] like below image.

Convert

The folder will convert to a branch as well as TFS change the icon at the same time.

FIG: 64 from our converted folder we may now create a new branch by choosing the option “Branch”. In source control right click on converted folder then choose Branch and Merging > Branch.

Branch

FIG: 65 type a branch name with specifying description in description field and click Branch.

Branch

FIG: 66 yes/no prompt will appear, Click Yes to perform the operation.

operation

FIG: 67 as you can see a new branch is created with our specified name “DEVELOPMENT”. Perform “Get Latest version” action to update the local files downloading from server.

server

Merging

Merging branch is another TFS great option to combine the changes between two branches. In this option we must require to resolve the conflicted file.

FIG: 68 right click the updated folder choose Branching and Merging select Marge.

Marge

FIG: 69 a wizard will appear with source & target branch path. Choose Next.

next

FIG: 70 choose a type then click next.

next

FIG: 71 TFS will do a merge operation between branches with pending changes.

changes

FIG: 72 all changed files will included in pending list. Perform a check-in operation to update the TFS server with changed file. Click Check in.

Check in

FIG: 73 Finally Let’s build and run the application.

application

Reference: https://msdn.microsoft.com

Hope this will help.


Similar Articles