39
Notes By Deepak Khare: http://blogs.msdn.com/b/deepakkhare/ Team Foundation Server Administration – Certification (70-496) Preparation

Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Team Foundation Server Administration ndash Certification (70-496) Preparation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Contents Introduction 3

Install and configure Team Foundation Server (TFS) 4

Manage Team Foundation Server 9

Customize Team Foundation Server for Team Use 21

Administer version control 29

Useful Resources 38

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Introduction

Administering Visual Studio Team Foundation Server Certification (70-496) is excellent way

to get in-depth knowledge of the product and is extremely helpful in TFS administration Sharing below resources which were extremely helpful in passing my certification exam

While these resources could be helpful in the exam there is no better way to read the

information and practice on a testnon user impacting TFS instance

Note Information in this article is for reference purpose only please go through entire

content available online in books to get extensive knowledge around each of the topic

Whatrsquos in Exam

Per Microsoft site httpswwwmicrosoftcomlearningen-usexam-70-496aspx exam is

divided into four quadrants

1 Install and configure Team Foundation Server (TFS) (25‒30)

2 Manage Team Foundation Server (25‒30)

3 Customize Team Foundation Server for team use (20‒25)

4 Administer version control (25‒30)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Install and configure Team Foundation Server (TFS)

Operating System Requirement

64-bit Windows Server 2008 with Service Pack 2

64-bit Windows Server 2008 R2 with Service Pack 1

64-bit Windows Server 2012

SQL Server Requirement

TFS 2012 requires SQL Server 2008 R2 or SQL Server 2012

IIS Requirement

IIS is now automatically installed for you by the TFS installer

Installation Options

TFS 2012 installation options include

Basic

Standard Single server installation

Advanced

Application-Tier only

Upgrading TFS from an earlier release of it

Build services installation

Proxy services installation

Configuring SMTP Settings for TFS

Sending emails is an important capability of Team Foundation Server

Emails can be configured for TFS Alerts or for sending things such as list of work

items to other users

You need to ensure your TFS server has been configured with details for an SMTP

server

You can provide details including SMTP Server Sender Credentials non-standard

ports and SSL

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)

On the TFS application-tier open the administration console for Team Foundation

Server

In the navigation bar choose Application Tier and then click Change URLs

The Change URLs window opens

In Notification URL type the URL for the new application-tier server and then

choose OK

On the SharePoint Server

On server running SharePoint open the administration console for Team Foundation

Server

In the navigation bar choose Extensions for SharePoint Products select the

SharePoint Web Application and then click Modify access

The Access for Team Foundation Server window opens

In URL for Team Foundation Server type the URL for the new application-tier server

and then choose OK

UpgradeMove a team project collection

Why

You want to expand your deployment of TFS by adding another instance of SQL

Server to it and you want to distribute existing collections between the instances

You have more than one deployment of TFS in your organization and you want to

move a collection to another deployment to better align with your business needs

You want to move the collection to a remote office that has its own deployment of

TFS

You want to incrementally upgrade your deployment by detaching an individual team

project collection from a deployment of TFS running an earlier version and then move

it to a server running the current version of TFS (In this scenario you must also then

upgrade each team project within the collection by using the Configure Features

wizard For more information see Configure features after a TFS upgrade

To move a team project collection you must complete the following procedures in the

sequence listed

1 Required Permissions

2 Save Reports

3 Delete Lab Management Resources

4 Unmap the Collection from Microsoft Project Server

5 Detach the Collection

6 Back Up the Collection Database

7 Rebuild the Data Warehouse and Analysis Services

8 Prepare to Move the Site Collection Database

9 Move the Site Collection Database

10 Restore the Collection Database

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 2: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Contents Introduction 3

Install and configure Team Foundation Server (TFS) 4

Manage Team Foundation Server 9

Customize Team Foundation Server for Team Use 21

Administer version control 29

Useful Resources 38

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Introduction

Administering Visual Studio Team Foundation Server Certification (70-496) is excellent way

to get in-depth knowledge of the product and is extremely helpful in TFS administration Sharing below resources which were extremely helpful in passing my certification exam

While these resources could be helpful in the exam there is no better way to read the

information and practice on a testnon user impacting TFS instance

Note Information in this article is for reference purpose only please go through entire

content available online in books to get extensive knowledge around each of the topic

Whatrsquos in Exam

Per Microsoft site httpswwwmicrosoftcomlearningen-usexam-70-496aspx exam is

divided into four quadrants

1 Install and configure Team Foundation Server (TFS) (25‒30)

2 Manage Team Foundation Server (25‒30)

3 Customize Team Foundation Server for team use (20‒25)

4 Administer version control (25‒30)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Install and configure Team Foundation Server (TFS)

Operating System Requirement

64-bit Windows Server 2008 with Service Pack 2

64-bit Windows Server 2008 R2 with Service Pack 1

64-bit Windows Server 2012

SQL Server Requirement

TFS 2012 requires SQL Server 2008 R2 or SQL Server 2012

IIS Requirement

IIS is now automatically installed for you by the TFS installer

Installation Options

TFS 2012 installation options include

Basic

Standard Single server installation

Advanced

Application-Tier only

Upgrading TFS from an earlier release of it

Build services installation

Proxy services installation

Configuring SMTP Settings for TFS

Sending emails is an important capability of Team Foundation Server

Emails can be configured for TFS Alerts or for sending things such as list of work

items to other users

You need to ensure your TFS server has been configured with details for an SMTP

server

You can provide details including SMTP Server Sender Credentials non-standard

ports and SSL

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)

On the TFS application-tier open the administration console for Team Foundation

Server

In the navigation bar choose Application Tier and then click Change URLs

The Change URLs window opens

In Notification URL type the URL for the new application-tier server and then

choose OK

On the SharePoint Server

On server running SharePoint open the administration console for Team Foundation

Server

In the navigation bar choose Extensions for SharePoint Products select the

SharePoint Web Application and then click Modify access

The Access for Team Foundation Server window opens

In URL for Team Foundation Server type the URL for the new application-tier server

and then choose OK

UpgradeMove a team project collection

Why

You want to expand your deployment of TFS by adding another instance of SQL

Server to it and you want to distribute existing collections between the instances

You have more than one deployment of TFS in your organization and you want to

move a collection to another deployment to better align with your business needs

You want to move the collection to a remote office that has its own deployment of

TFS

You want to incrementally upgrade your deployment by detaching an individual team

project collection from a deployment of TFS running an earlier version and then move

it to a server running the current version of TFS (In this scenario you must also then

upgrade each team project within the collection by using the Configure Features

wizard For more information see Configure features after a TFS upgrade

To move a team project collection you must complete the following procedures in the

sequence listed

1 Required Permissions

2 Save Reports

3 Delete Lab Management Resources

4 Unmap the Collection from Microsoft Project Server

5 Detach the Collection

6 Back Up the Collection Database

7 Rebuild the Data Warehouse and Analysis Services

8 Prepare to Move the Site Collection Database

9 Move the Site Collection Database

10 Restore the Collection Database

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 3: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Introduction

Administering Visual Studio Team Foundation Server Certification (70-496) is excellent way

to get in-depth knowledge of the product and is extremely helpful in TFS administration Sharing below resources which were extremely helpful in passing my certification exam

While these resources could be helpful in the exam there is no better way to read the

information and practice on a testnon user impacting TFS instance

Note Information in this article is for reference purpose only please go through entire

content available online in books to get extensive knowledge around each of the topic

Whatrsquos in Exam

Per Microsoft site httpswwwmicrosoftcomlearningen-usexam-70-496aspx exam is

divided into four quadrants

1 Install and configure Team Foundation Server (TFS) (25‒30)

2 Manage Team Foundation Server (25‒30)

3 Customize Team Foundation Server for team use (20‒25)

4 Administer version control (25‒30)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Install and configure Team Foundation Server (TFS)

Operating System Requirement

64-bit Windows Server 2008 with Service Pack 2

64-bit Windows Server 2008 R2 with Service Pack 1

64-bit Windows Server 2012

SQL Server Requirement

TFS 2012 requires SQL Server 2008 R2 or SQL Server 2012

IIS Requirement

IIS is now automatically installed for you by the TFS installer

Installation Options

TFS 2012 installation options include

Basic

Standard Single server installation

Advanced

Application-Tier only

Upgrading TFS from an earlier release of it

Build services installation

Proxy services installation

Configuring SMTP Settings for TFS

Sending emails is an important capability of Team Foundation Server

Emails can be configured for TFS Alerts or for sending things such as list of work

items to other users

You need to ensure your TFS server has been configured with details for an SMTP

server

You can provide details including SMTP Server Sender Credentials non-standard

ports and SSL

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)

On the TFS application-tier open the administration console for Team Foundation

Server

In the navigation bar choose Application Tier and then click Change URLs

The Change URLs window opens

In Notification URL type the URL for the new application-tier server and then

choose OK

On the SharePoint Server

On server running SharePoint open the administration console for Team Foundation

Server

In the navigation bar choose Extensions for SharePoint Products select the

SharePoint Web Application and then click Modify access

The Access for Team Foundation Server window opens

In URL for Team Foundation Server type the URL for the new application-tier server

and then choose OK

UpgradeMove a team project collection

Why

You want to expand your deployment of TFS by adding another instance of SQL

Server to it and you want to distribute existing collections between the instances

You have more than one deployment of TFS in your organization and you want to

move a collection to another deployment to better align with your business needs

You want to move the collection to a remote office that has its own deployment of

TFS

You want to incrementally upgrade your deployment by detaching an individual team

project collection from a deployment of TFS running an earlier version and then move

it to a server running the current version of TFS (In this scenario you must also then

upgrade each team project within the collection by using the Configure Features

wizard For more information see Configure features after a TFS upgrade

To move a team project collection you must complete the following procedures in the

sequence listed

1 Required Permissions

2 Save Reports

3 Delete Lab Management Resources

4 Unmap the Collection from Microsoft Project Server

5 Detach the Collection

6 Back Up the Collection Database

7 Rebuild the Data Warehouse and Analysis Services

8 Prepare to Move the Site Collection Database

9 Move the Site Collection Database

10 Restore the Collection Database

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 4: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Install and configure Team Foundation Server (TFS)

Operating System Requirement

64-bit Windows Server 2008 with Service Pack 2

64-bit Windows Server 2008 R2 with Service Pack 1

64-bit Windows Server 2012

SQL Server Requirement

TFS 2012 requires SQL Server 2008 R2 or SQL Server 2012

IIS Requirement

IIS is now automatically installed for you by the TFS installer

Installation Options

TFS 2012 installation options include

Basic

Standard Single server installation

Advanced

Application-Tier only

Upgrading TFS from an earlier release of it

Build services installation

Proxy services installation

Configuring SMTP Settings for TFS

Sending emails is an important capability of Team Foundation Server

Emails can be configured for TFS Alerts or for sending things such as list of work

items to other users

You need to ensure your TFS server has been configured with details for an SMTP

server

You can provide details including SMTP Server Sender Credentials non-standard

ports and SSL

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)

On the TFS application-tier open the administration console for Team Foundation

Server

In the navigation bar choose Application Tier and then click Change URLs

The Change URLs window opens

In Notification URL type the URL for the new application-tier server and then

choose OK

On the SharePoint Server

On server running SharePoint open the administration console for Team Foundation

Server

In the navigation bar choose Extensions for SharePoint Products select the

SharePoint Web Application and then click Modify access

The Access for Team Foundation Server window opens

In URL for Team Foundation Server type the URL for the new application-tier server

and then choose OK

UpgradeMove a team project collection

Why

You want to expand your deployment of TFS by adding another instance of SQL

Server to it and you want to distribute existing collections between the instances

You have more than one deployment of TFS in your organization and you want to

move a collection to another deployment to better align with your business needs

You want to move the collection to a remote office that has its own deployment of

TFS

You want to incrementally upgrade your deployment by detaching an individual team

project collection from a deployment of TFS running an earlier version and then move

it to a server running the current version of TFS (In this scenario you must also then

upgrade each team project within the collection by using the Configure Features

wizard For more information see Configure features after a TFS upgrade

To move a team project collection you must complete the following procedures in the

sequence listed

1 Required Permissions

2 Save Reports

3 Delete Lab Management Resources

4 Unmap the Collection from Microsoft Project Server

5 Detach the Collection

6 Back Up the Collection Database

7 Rebuild the Data Warehouse and Analysis Services

8 Prepare to Move the Site Collection Database

9 Move the Site Collection Database

10 Restore the Collection Database

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 5: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Changing the URL (friendly name)

Via TFS Administration UI (On the TFS AT Server)

On the TFS application-tier open the administration console for Team Foundation

Server

In the navigation bar choose Application Tier and then click Change URLs

The Change URLs window opens

In Notification URL type the URL for the new application-tier server and then

choose OK

On the SharePoint Server

On server running SharePoint open the administration console for Team Foundation

Server

In the navigation bar choose Extensions for SharePoint Products select the

SharePoint Web Application and then click Modify access

The Access for Team Foundation Server window opens

In URL for Team Foundation Server type the URL for the new application-tier server

and then choose OK

UpgradeMove a team project collection

Why

You want to expand your deployment of TFS by adding another instance of SQL

Server to it and you want to distribute existing collections between the instances

You have more than one deployment of TFS in your organization and you want to

move a collection to another deployment to better align with your business needs

You want to move the collection to a remote office that has its own deployment of

TFS

You want to incrementally upgrade your deployment by detaching an individual team

project collection from a deployment of TFS running an earlier version and then move

it to a server running the current version of TFS (In this scenario you must also then

upgrade each team project within the collection by using the Configure Features

wizard For more information see Configure features after a TFS upgrade

To move a team project collection you must complete the following procedures in the

sequence listed

1 Required Permissions

2 Save Reports

3 Delete Lab Management Resources

4 Unmap the Collection from Microsoft Project Server

5 Detach the Collection

6 Back Up the Collection Database

7 Rebuild the Data Warehouse and Analysis Services

8 Prepare to Move the Site Collection Database

9 Move the Site Collection Database

10 Restore the Collection Database

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 6: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

11 Attach the Collection

12 Move Reports

13 Reconnect Resources for the SharePoint Web Application

14 Configure the Moved Team Project Collection

15 Configure Lab Management Resources

16 Configure Project Server Integration

17 Configure Projects

Build Controller

To use Team Foundation Build for automated building and testing of your app you must

first set up a build server add a build controller and a few build agents and finally

designate a drop folder

Each build controller is dedicated to a single team project collection The build controller

performs some lightweight tasks such as determining the name of the build creating the

label in version control logging notes and reporting status from the build

Required Permissions

You must be a member of the Windows Administrators group on the build server and a

member of the Project Collection Build Administrators group on your team project collection

Build Agent

Each build agent is dedicated to and controlled by a single build controller Build agents can

be hosted on the same build server that hosts their build controller but this is not required

and in some cases your teamrsquos needs can most efficiently be met by a single build server to

host a build controller that controls build agents on multiple build servers

The build agent executes the steps of your build process that are contained in the

AgentScope activity Typically these steps include getting files from version control

provisioning the workspace compiling the code running tests and merging files back into

version control

Team Foundation Build variables

You can use the following variables in a build agent working directory

bull $(BuildAgentId) An automatically generated integer that uniquely identifies a build agent

within a team project collection

bull $(BuildAgentName) The Display Name of the build agent

bull $(BuildDefinitionId) An automatically generated integer that uniquely identifies a build

definition within a team project collection

bull $(BuildDefinitionPath) The team project name and the build definition name separated

by a backslash

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 7: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Lab Management

A lab environment is a collection of virtual and physical machines which you can use to

develop and test applications A lab environment can contain multiple roles needed to test

multi-tiered applications such as workstations web servers and database servers In

addition you can use a build-deploy-test workflow with your lab environment to automate

the process of building deploying and running automated tests on your application

Why

1 Use a test plan to run automated tests

2 Use a build-deploy-test workflow

3 Collect diagnostic data from all machines even during manual testing

4 Automatic test agent installation

With System Center Virtual Machine Manager (SCVMM) you can also get these

benefits when you use lab environments

Quickly reproduce machine configurations

Reproduce the exact conditions of a bug

Run multiple copies of a lab environment at the same time

Standard Environments Vs SCVMM Environments

There are two types of lab environments that you can create with Visual Studio Lab

Managementmdashstandard Environments and SCVMM Environments However the capabilities

of each type of environment are different

Standard Environments Standard environments can contain a mix of virtual and physical

machines You can also add virtual machines to a standard environment that are managed

by third-party virtualization frameworks In addition standard environments do not require

additional server resources such as an SCVMM server

SCVMM environments SCVMM environments can only contain virtual machines that are

managed by SCVMM (System Center Virtual Machine Manager) so the virtual machines in

SCVMM environments can only run on the Hyper-V virtualization framework

Advantages of SCVMM environment

Environment snapshots

Stored environments

Network isolation

Virtual machine templates

Stored Virtual Machines

Avoiding Computer Name Conflicts

Using network isolation

Using templates

Using stored virtual machines

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 8: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Naming conflicts occur when two or more computers share domain identifiers such as

computer names or IP addresses If multiple copies of a virtual machine are running (active)

in a domain or workgroup and share one or more of these identifiers a naming conflict can

and frequently will occur

System Center Virtual Machine Manager (SCVMM)

To access the virtual machines that you create with Hyper-V from Lab Management you

must install and configure SCVMM SCVMM is a tool for managing your Hyper-V host

machines from a central console Lab Management communicates with SCVMM to be able to

use the virtual machines and templates to create environments Two versions of System

Center Virtual Machine Manager are supported for Lab Management SCVMM 2012 or

SCVMM 2008 R2

Test Agent and Controller

You must use a test controller and test agents to run tests run tests remotely or distribute

automated tests to multiple machines using Visual Studio 2012 or Microsoft Test Manager A

test controller distributes tests and manages test runs remotely by communicating with test

agents that are installed on each test machine Each test agent can perform tasks such as

installing software running tests and collecting test data

Why

Run automated tests remotely using Visual Studio

Distribute automated tests to multiple machines using Visual Studio

Run tests and collect test data remotely using Microsoft Test Manager

Use a lab environment

Run tests in lab environment

Deploy an application in a lab environment using a build-deploy-test workflow

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 9: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Manage Team Foundation Server

CreateManage TPC

You can manage your team projects more efficiently by grouping them together and

assigning the same resources to them For example you can group projects that have

similar requirements or objectives such as all projects that relate to a particular code base

You can then manage that grouping as an autonomous resource with its own user groups

server resources and maintenance schedule In Team Foundation Server (TFS) you group

team projects together in one or more organizational units called team project collections

All the artifacts and data that those projects use are stored in the single database of the

collection

LimitationsDisadvantages

Complex architecture Increased number of databases to manage You cannot link work items across collections You cannot branch or merge code across collections You cannot create queries across collections

How to Create TPC

1 Open the administration console for Team Foundation

Expand the name of the server expand Application Tier and choose Team Project

Collections

2 In Team Project Collections choose Create Collection

The Create Team Project Collection wizard opens

3 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 and follow

the wizard

Split a Team Project Collection

1 Detach a TPC

2 Copy Original DB and restore with New DB name

3 Attach Original TPC

4 Attach New TPC

5 Clean up Team Projects

Create a Team Project

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 10: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You create a team project for Visual Studio Team Foundation Server (TFS) to provide a

central point for developing a specific software technology or product A team project

provides a repository for source code and work items

1 In Team Explorer choose the Create a New Team Project link or choose File New

Team Project

The New Team Project wizard appears

2 On the Specify the Team Project Settings page type a name for the team project

that you want to create in the What is the name of the team project box

You must specify a unique name that is no more than 64 characters The name should

be descriptive enough that your team members can easily associate it with the

software product Your team members will use this name to connect to the team

project

3 (Optional) Type a description of the project in the What is the description of the team

project text box The description is stored in Team Foundation Server and provides

the site description for the optional team project portal SharePoint site

4 Choose the Next button

5 On the Select a Process Template page choose a process template from the Which

process template should be used to create the team project list

6 If you want to accept the default settings on the remaining wizard pages choose the

Finish button Otherwise choose the Next button

If you choose the Finish button the following tasks are performed automatically o A SharePoint site for your team project is created when your team project

collection is configured with SharePoint Products o An empty version control folder for your team project is created

7 Complete the Team Site Settings page which appears only when your team project

collection is configured with SharePoint Products

1 Choose the Create a new SharePoint site radio button if you want to create a

SharePoint site for your project

2 Choose the Configure radio button to verify or modify the settings for your

SharePoint site

In the Select Location to Create SharePoint Site dialog box verify or choose the

URL for the Web application and the Relative site path to which you want to

connect

8 On the Specify Source Control Settings page choose one of the following options o Choose the Create an empty source control folder radio button to use the

name of the team project for the new folder o Choose the Create a new source control branch radio button and specify the

folder from which you want to branch

9 On the Confirm Team Project Settings page review the choices and values that you

specified If the information is correct choose the Finish button Otherwise choose the

Previous button to make changes

The New Team Project wizard creates your team project

10 On the Team Project Creation Status page view the status messages and status bar

for information about the components that are being created

11 On the Team Project Created page if you want to read more details about the work

items roles activities and other aspects of the team process select the Launch the

process guidance for more information about how to run the team project check box

12 Choose the Close button

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 11: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Backup

You can manually back up data for Visual Studio Team Foundation Server by using the tools

that SQL Server provides As of Cumulative Update 2 TFS includes a Scheduled Backups

feature to automatically configure backups However you might need to configure backups

manually if your deployment has security restrictions that prevent use of that tool To

manually back up Team Foundation Server you must not only back up all databases that

the deployment uses you must also synchronize the backups to the same point in time You

can manage this synchronization most effectively if you use marked transactions If you

routinely mark related transactions in every database that Team Foundation uses you

establish a series of common recovery points in those databases If you regularly back up

those databases you reduce the risk of losing productivity or data because of equipment

failure or other unexpected events

Restore Application Tier

The databases for Team Foundation store all data for your deployment of Team Foundation

Server Even if you back up the application-tier server you will not back up any data for

Team Foundation Server However if the hardware of an application-tier server fails you

can install another application-tier server and configure it to use the databases for your

deployment That server will then replace the offline server as the application-tier server for

the deployment If your application-tier server hosted SharePoint Products you must also

restore that software on the new hardware

To install and configure a server as the application-tier server

1 Stop the application pools and services that Team Foundation Server uses

For more information see TFSServiceControl Command

2 If you are using Network Service as the service account for Team Foundation

(TFSService) on the application-tier server open a Command Prompt window and

change directories to DriveProgram Files Microsoft Team Foundation Server

110Tools At the command prompt enter the following command

TfsConfig Accounts add accountNT AuthorityNetwork Service

SQLInstance ServerName DatabaseName DatabaseName

3 Install Team Foundation Server on the new server and start the Application-Tier

Only wizard

4 If you are using Visual Studio Lab Management install the System Center Virtual

Machine Manager (SCVMM) Administrator Console on the application tier and

configure it to connect to the server that is running SCVMM

For more information see Configuring Lab Management for SCVMM Environments

5 If the computer name has changed open the administration console for Team

Foundation

6 In the navigation bar choose Application Tier and then choose Change URLs

The Change URLs window opens

7 In Notification URL specify the URL for the new application-tier server and then

choose OK

Summary

Install TFS 2012

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 12: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run the Application-Tier Only wizard from the TFS 2012

Run the TFS Administration Console

Choose Application Tier -gt Change URLs

Enter the URL to the new Application Tier

Restore Database Tier

Restore the databases to a new SQL Server

Run the TFSConfig RemapDBs command

TFSConfig RemapDBs DatabaseNameServerNameDatabaseName

SQLInstancesSQLServerName [AnalysisInstanceASServerName]

[AnalysisDatabaseNameDatabaseName]

[preview] [continue] [usesqlalwayson]

TFexe Useful commands

tf delete Removes files and folders from Team Foundation version control and deletes

them from the disk

tf destroy Destroys or permanently deletes version-controlled files from Team

Foundation version control

tf label Attaches a label to or removes a label from a version of a file or folder in Team

Foundation version control

tf labels Displays the list of labels in Team Foundation version control

tf

shelve

Stores a set of pending changes together with pending check-in notes a

comment and a list of associated work items in Team Foundation Server without

actually checking them into the version control server

tf shelvesets Displays information about a set of shelved changes

Tf

status

Displays information about pending changes to items in one or more workspaces

tf undelete Restores items that were previously deleted

tf undo Removes pending changes from a workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 13: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

tf workspace Creates deletes displays or modifies properties and mappings associated

with a workspace

tf

workspaces

Displays information about workspaces in the system and updates cached

information about a user name or computer name change on Team

Foundation Server

Caches Refresh

Work Item Caches Error

1 On the New AT Server (only once)

2 httpMyTfs8080WorkItemTrackingv30ClientServiceasmx

3 Invoke StampWorkitemCache method

Version Control Cache

1 On every client computer in the organization

2 tf workspaces collection httpMyTFS8080tfsCollectionName

Monitor amp Performance

How to monitor warehouse adaptors amp jobs

1 Can be done only from application tier server

2 WarehouseControlWebservice is central location for adaptors amp jobs monitoring

httplocalhost8080tfsTeamFoundationAdministrationv30WarehouseControlServiceas

mx

Individual Commands Performance

1 Tbl_Command amp tbl_Parameter tables in each TPC database

2 Collects performance information for each information

Out of the box tool

httpMyTFSserver8080tfs_oi

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 14: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Configure Team Build to use Proxy

1 Open Registry on build service (RegEdit)

2 Expand HKEY_CURRENT USER to

HKEY_CURRENT_USERSoftwareMicrosoftVisualStudio110TeamFoundati

onSourceControlProxy

3 In the details pane set Enabled to True and then set URL to

httpProxyServerPort

4 On the File menu click Exit to close Registry Editor

Lab Environment

You can create and manage lab environments with the Lab Management features of

Microsoft Test Manager A lab environment is a collection of virtual and physical machines

which you can use to develop and test applications A lab environment can contain multiple

roles needed to test multi-tiered applications such as workstations web servers and

database servers In addition you can use a build-deploy-test workflow with your lab

environment to automate the process of building deploying and running automated tests

on your application

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Advantages of using lab environment

1 Use a test plan to run automated tests minus you can run a collection of automated

tests called a test plan and view the progress using Microsoft Test Manager

2 Use a build-deploy-test workflow minus you can use a build-deploy-test workflow to test

multi-tiered applications automatically A typical example is a workflow that starts a

build deploys the build files onto the appropriate machines in a lab environment and

then performs automated tests In addition you can schedule your workflow to run at

specific intervals

3 Collect diagnostic data from all machines even during manual testing minus you can

collect diagnostic data from multiple machines simultaneously For example during a

single test run you can collect IntelliTrace test impact and other forms of data from

a web server a database server and a client

4 Automatic test agent installation minus Lab Management automatically installs test

agents on every machine in your environment

If you use Lab Management in conjunction with System Center Virtual Machine

Manager (SCVMM) you can also get these benefits when you use lab

environments

Quickly reproduce machine configurations minus you can store collections of virtual

machines that are configured to recreate typical production environments You can

then perform each test run on a new copy of a stored environment

Reproduce the exact conditions of a bug ndash When a test run fails you can store a

copy of the state of your lab environment and access it from your build results or a

work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 15: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Run multiple copies of a lab environment at the same time ndash You can run multiple

copies of your lab environment at the same time without naming conflicts

Changing Properties of an SCVMM environment

You can change the properties or the composition of a SCVMM environment The

following examples illustrate the kinds of changes you might make during the lifecycle

of an application

Change the name of an environment or its description after you have installed

new applications into it

Remove a virtual machine with an outdated OS and add another virtual machine

with a new OS to an existing stored environment

Change the environment capabilities in a stored environment so that all active

environments created from it will have those capabilities

In Microsoft Test Manager you can view and change active environments by choosing

the Lab tab You can view and change stored environments by choosing the Library

tab

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

To view or change the properties of an active SCVMM environment

1 Open Microsoft Test Manager and connect to the team project

2 Open Lab Center

3 Choose the Lab tab

4 Choose the Environments sub-tab

5 A list of environments is displayed

6 Choose the environment that you want to view or change

7 Choose Open and then follow the steps in the wizard to view or change the

properties

8 If you have opened the wizard just to view the properties of the SCVMM

environment choose Cancel to close the wizard If you have made changes and

want to save the changes choose Finish

Repairing Lab Environments

When you view your lab environment in the Environments tab in Lab Center the status

might be in the Not Ready state and display the error message ldquoThe environment has one

or more errorsrdquo

This indicates that your environment is not ready to be used for manual or automated

testing or with build deploy and test workflows This error might indicate one of the

following problems

1 The installation or configuration of a test agent on one or more of the machines in

your environment failed

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 16: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 There is a communication problem between one of the test agents in your

environment and your test controller

3 The test controller or the test agent process has shut down or is not functioning

4 The user account of the test agent or the lab service account cannot be

authenticated by the test controller

To address any of these problems you need to repair your environment

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

Repairing the environment

1 Choose your environment in the Environments list

2 Choose Repair Environment from the shortcut menu of your environment

3 The Status of your environment will change to Repairing

4 If the repair is successful the Status of the environment will change to Ready

Using Environment Snapshots

A snapshot of an environment is a file-based copy of the state disk data and configuration

of all virtual machines in an environment at a specific point in time After you take a

snapshot you can continue to work in the environment taking more snapshots as needed

You can then restore the environment to a previous state You can also create a link file to a

snapshot that enables other members of your team to connect to or re-create the snapshot

You can also save a copy of the environment and its snapshots to the team project library

When you save an environment to the team project library both the environment and the

snapshots are saved in the team project library

Requirements

Visual Studio Ultimate Visual Studio Premium Visual Studio Test Professional

What you can do with environment snapshots

Creating Snapshots of an Environment

Restoring an Environment From a Snapshot

Sharing a Snapshot of an Environment

Storing an Environment With Snapshots in the Library

Deleting a Snapshot of an Environment

Store an SCVMM Environment

A stored environment is a set of configuration files virtual machines and templates that are

located on the library servers of the System Center Virtual Manager (SCVMM) for a team

project Stored environments are one way to create deployed environments A stored

environment cannot be started and run When you deploy a stored environment virtual

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 17: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

machines are created on the team project host groups from the templates and stored virtual

machines of the stored environment

How to create and use stored environments in the following situations

This topic describes how to create and use stored environments in the following situations

Archiving deployed

environments

Store an environment for later use when you delete a

deployed environment

Creating stored environments

from stored virtual machines

and templates

Create a stored environment from virtual machines or

templates in the project library

Creating a stored network

isolated environment

Store a network isolated environment to create exact

duplicates of an environment that can run at the same

time

Creating a stored environment

from a deployed environment

Prepare the virtual machines in a deployed environment for

re-use and then store the environment to create

functionally identical environments that do not use network

isolation You can create stored environments of the

following types

Stored environments of templates

Stored environments of virtual machines

Manage Security

If you donrsquot see the product backlog page or canrsquot send feedback requests it might be

because you donrsquot have the right level of access to the features in Team Web Access There

are three levels of access standard full or limited

Any user with a TFS client-access license (CAL) can have standard access

Full access is available to users who have one of these MSDN subscriptions Visual

Studio Ultimate with MSDN Visual Studio Premium with MSDN or Visual Studio Test

Professional with MSDN With full access you get the more advanced agile project

management tools and you can send feedback requests

You can give anyone limited access Therersquos no license required Limited access is

helpful when you want to use TFS to collaborate with your customers or stakeholders

(or anyone whorsquos not on your team really)

Tip

For a team project upgraded with the RTM release of TFS 2012 you must enable new

featuresmdashsuch as the product backlog page and feedback requestsmdashusing the

Configure Features wizard

Limited access (Also called Work Item Only View)

Users with limited access can create work items and edit the work items that they created

but they donrsquot have access to any other pages

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 18: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Project managers or other personnel who dont use Visual Studio can still support their

teams through Limited access Limited access to TFS was designed to support members in

an organization with a TFS deployment who dont have a client access license (CAL) This

view restricts functionality so that your organization complies with the end-user license

agreement for Team Foundation Server

Standard access

Standard access includes access to the team home page work items source and build

pages You can manage your team on the team home page view and manage source code

changesets and shelvesets on the Code page view and manage builds on the Build page

and plan and manage your work in various views

Full access

With full access you can plan and organize your work on the product backlog page

Manage Reporting

By adding a report server to your TFS (on-premises) deployment you can access a wealth

of data about your teams projects such as build quality bug trends burndown and test

progress SQL Server Reporting Services (SSRS) reports provide insight to help teams

manage work and improve processes

After youve added a report server youll want to add reports to your team project You can

upload reports when connecting to an on-premises deployment of TFS 2010 or TFS 2012

Upload reports to your team project

Use the tfpt command line tool that TFS Power Tools provides

1 From Team Explorer download the latest process template that is compatible with

the one used to create your team project

2 Upload the reports The process template you specify must be compatible with the

one used to create the team project And it must have been uploaded to the team

project collection that hosts your team project

tfpt addprojectreports

collectionhttpMyServer8080tfsDefaultCollection

teamprojectMyProject processtemplateTemplateName

Depending upon the amount of data that has been collected for your team project it

can take several minutes to several hours for the data warehouse and cube to build

Once they do however you can view progress for your team project since TFS was

first deployed

Project Portal

Team Foundation Server project portals are SharePoint sites that are able to present and

link to data for a team project Once a SharePoint Web application has been configured for

use with a Team Foundation Server application-tier SharePoint sites within the Web

application can begin to incorporate access to team project data

A project portal can present data from a team project using any or all of the following

(depending on the capabilities of the environment)

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 19: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Excel Web Access Web Parts that display Excel workbooks which are retrieving data

from the Server SQL Server Analysis Services database for Team Foundation Server

Team Web Access Web Parts that access data from the Team Foundation Server

operational data store

TfsRedirect application page that enables access to other team project resources

such as the associated SQL Server Reporting Services report folder Team Web Access

site or process guidance

Figure shows the flow of data from the Operational data stores through the Data

Warehouse and into the Analysis Services cube From there the data can be retrieved and

shown on the dashboards through a variety of methods

Retrieval Method Source Dashboard Component

Team Foundation

Server web services

Team Foundation Server operational

data

Team Web Access Web Parts

SharePoint Products

with Excel Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Excel Web Access Web Part

SQL Server Reporting

Services

Team Foundation Server data

warehouse or SQL Server Analysis

Services cube

Page Viewer Web Parts or

Reporting Services Web Part

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 20: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Rebuilding the Warehouse and Cube

Option 1

Manual approach

Go to

httplocalhost8080tfsTeamFoundationAdministrationv30Wareh

ouseControlServiceasmx

Process the warehouse

o click ProcessWarehouse and then click Invoke

Process the cube

o click ProcessAnalysisDatabase

o in processingType type either Incremental or Full and then click Invoke

Option 2

Using the TFS Administration Console

Open the administration console for Team Foundation

Under Team Foundation expand the name of the server expand Application

Tier and then click Reporting

Under Reporting click Start Rebuild

The Take Offline dialog box opens

Click OK to take the data warehouse and Analysis Services cube offline

The Rebuild the Warehouse and Analysis Services Databases dialog box

opens

Click OK to initiate the rebuild process

Option 3

Using the TfsConfigexe RebuildWarehouse command

Log in with an elevated command prompt

Type TFSConfig RebuildWarehouse analysisServices to only process the

cube

Type TFSConfig RebuildWarehouse all to process both the warehouse

and the cube

Note This command has NO option that will allow you to ONLY process the

warehouse without the cube

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 21: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Customize Team Foundation Server for Team Use

Configure a team build definition

Configure a team build definition

setting up for a symbol server and source server

setting up for custom build numbers

configuring build log verbosity

setting up definition properties including test impact analysis code analysis

automated unit testing and architecture validation

setting up build triggers (gated check-in continuous integration scheduled

build)

configuring the build drop location to be in source code control or a fileshare

Custom Build Numbers

You can define your build process to load useful data into the name of each completed build

You specify how completed builds are named by using an expression Consider the following

example

The team project is named MyTFSProject

The build definition is named DailyBuild

The build ID is 1

Today is Feb 14 2014

The time is 80001 AM

The build has been run one time today

You could set the BuildNumberFormat property to the following value

$(BuildDefinitionName)_$(DateyyyyMMdd)$(Revr)

Symbol Data

To prepare your SymStore symbol store

1 Set up a folder in which to store the symbols on a file-sharing server (for example

MyTFSProjectsymbols)

2 Grant Full Control permissions to the user account under which the build agent is

running

To publish symbol data by using a Default Template build definition

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

3 Choose Home and then choose Builds

2 Open the shortcut menu of a build and then

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 22: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Choose Edit Build Definition and then in the build definition window choose

the Process tab

2 Choose Queue New Build and then on the Queue Build dialog box choose the

Parameters tab

3 Under the Basic node expand the Source and Symbol Server Settings node

4 Set Index Sources to True

1 In Path to Publish Symbols type the UNC file path to the folder (for example

MyTFSProjectsymbols)

Configuring build log verbosity

In a build process that is based on the Default Template or the Upgrade Template you can

use the Logging Verbosity build process parameter to manage the verbosity of the

information that is logged and stored

Value Error

s

Warni

ngs

High-

Importance

Build

Messages

Normal-

Importance

Messages

Low-

Importance

Messages

Workflow

Activity

Properties

(inputs and

outputs)

Minimal Y N N N N N

Normal Y Y Y N N N

Detailed Y Y Y Y N N

Diagnostic

(Tip In most

cases you can

instead use

diagnostic

logs See

Diagnose Build

Problems)

Y Y Y Y On-premises

build

controller Y

Hosted Build

Controller N

Y

Best Practice Set Verbosity as Low as Possible

Although build information is important a build process that logs too much information can

cause problems These problems might include consuming too much storage on your Team

Foundation Server decreasing Visual Studio performance and overloading your team

members with more information than they can handle

Use Minimal Verbosity When Running a Build

When you are running a build you should generally follow the best practice of using the

lowest verbosity setting that still provides the information that you need to accomplish your

goal

Run Tests in Your Build Process

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 23: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

You can use Team Foundation Build to run automated tests and analyze the impact of code

changes on your tests as part of your build process For example you can define a build

process to serve as your teamrsquos regularly scheduled build verification test (BVT) run You

can also run automated tests and perform test-related tasks from your custom build

processes

You can perform one or more test runs in your build that is based on the Default Template

For each run you can specify the following settings

Which tests are run

Which settings are used to run the tests

Whether the build should fail if a test fails

To run automated tests in a build process that is based on the Default Template

1 On the menu bar choose View Team Explorer

2 In Team Explorer choose

Home and then choose Builds

3 On the Builds page choose New Build Definition or open the shortcut menu for the

build or build definition you chose and choose Edit Build Definition

The build definition window appears

4 On the Process tab of your build definition expand the Basic node

5 Select the Automated Tests check box and then choose the ellipsis button ()

The Automated Tests dialog box appears

6 Perform one of the following steps o To add a set of tests choose Add o To modify a set of tests choose it and then choose Edit

The AddEdit Test dialog box appears

7 (Optional) Specify the Name of the test run This name appears in the build results

window If you do not specify a name the system automatically generates it

8 If you want the build to fail if any of the tests in this run fail then choose Fail build

on test failure If you leave this check box cleared and any test fails the completed

build will be classified as Partially Succeeded

9 Choose a test runner Specify how the test runner will operate using the options that

appear

Build Triggers

You can manually queue a build whenever necessary but your teamrsquos needs will in most

cases be best met by build processes that are defined with automatic triggers When a

build is triggered a specific reason is recorded in the Reason property This topic describes

and explains how to use all the available build triggers and build reasons when you develop

your build process

Use Build Triggers to Accomplish Team Goals o Protect your team from build breaks o Maintain quality by using continuous integration o Check product quality by running nightly BVTs

Use Automatic Build Triggers o Use the Continuous Integration trigger to queue a build when a change is

checked in o Use the Rolling builds trigger to queue a build when a change is checked in

but with limits on how often a build is run

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 24: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

o Use the Gated Check-in trigger to queue a build when a team member

attempts to check in a change and block the change if the build fails o Use the Schedule trigger to queue a build on a regular interval

Manually Queue a Build o Queue a build o Queue a private build

Use Custom Code to Queue a Build

Work with Build Triggers and Reasons

Configure Build Drop Location

When you define or queue a build definition you can specify a path to a drop folder so that

your build process can deliver binaries and log files to your team Make sure the folder

yoursquove identified is prepared for use as a drop folder

Public Builds vs Private Build

Queue a public build if you want to build the most recent version of the source code in the

version control server

To queue a public build at a command prompt use the TFSBuild start command

Queue a private build if you want to build changes that you have put into a shelveset You

can use a private build (also known as a buddy build) to validate changes to your code

before you check it in

To queue a private build at a command prompt use the TFSBuild start command with the

shelveset option

Rate the Quality of a Completed Build

One way you can manage your completed builds is to manually rate the quality of each

build For example depending on the outcome of a set of manual tests you could rate a

completed builds quality as Ready for Deployment Rejected or Under Investigation By

rating the quality of completed builds you enable team members to filter the Build Explorer

window to show only builds with specific quality ratings

You can use the pre-defined build quality values or you can use your own rating system by

creating custom quality values

Required Permissions

To perform this procedure your Edit build quality permission must be set to Allow For more

information see Team Foundation Server Permissions

To rate the quality of a completed build in Build Explorer

1 In Team Explorer

1 If you are not already connected to the team project that you want to work

in then connect to the team project

2 Choose Home and then choose Builds

3 On the Builds page choose more and then choose View My Builds

The Build Explorer window opens

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 25: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 In Build Explorer on the Completed tab open the shortcut menu for the build whose

quality you want to rate and then choose Edit Build Quality

A drop-down list appears in the Build Quality column

3 From the drop-down list choose the build quality value that you want to assign to

this build

The chosen build quality is updated in Build Explorer

To rate the quality of a completed build in the build results window

1 In the Build Explorer window locate the build whose quality you want to rate and

then double-click it or open its shortcut menu and choose Open

2 At the top of the build results window choose the quality menumdashthe words ltNo

Quality Assignedgt are displayed in itmdashand then choose a quality value

Retention Policy (Cleanup)

On the Retention Policy tab you can specify how many completed builds you want to keep

You can modify two sets of retention policies in the Specify how builds should be retained

list and to meet your teams needs

The Triggered and Manual group of policies limit what the system keeps from those

builds that were queued either manually or by an automatic trigger

The Private group of policies limit what the system keeps from those builds that were

queued either manually from source code in a shelveset (as described in Queue a

Build)

To modify a retention policy for Stopped Failed Partially Succeeded or Succeeded

completed builds perform either or both of the following steps

Choose the value in the Retention Policy column and choose one of the following

options Keep All Keep Latest Only Keep 2 Latest Keep 5 Latest Keep 7 Latest Keep

10 Latest or Specify Count to Keep

Choose the value in the What to Delete column and choose a value

Process Template Customization

You will want to customize a process template to make sure that all team projects that

are created by using the template follow the business processes that your team or

organization uses Also you might want to customize a process template if you

upgrade Visual Studio Team Foundation Server from a previous release and you made

changes to an existing process template that you want to continue to use You might

want to add these changes to a new process template or customize the old template to

add functionality that was provided in the current release

To customize a process template you first download an existing or blank process

template modify or add files upload the process template files and then verify your

changes The following illustration shows the sequence of the five main tasks that you

perform to customize a process template

Customizing a process template is an iterative process You will need a team project

collection that is defined on a server that is running Team Foundation Server where

you can test your process template to make sure that it was customized correctly

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 26: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Download the process template that you are either currently using or that most

closely matches what you will be using

2 Rename the template (Important)

3 Make a few small changes at a time verifying your changes as you go

4 Upload to a non-production server to test

5 Create a new team project using your template

6 Verify the changes you have made are correct

Customize Functional Areas within a Process Template

You can define the initial configuration of most functional areas that are provided by Visual

Studio Application Lifecycle Management (ALM) and Visual Studio Team Foundation Server

Specifically you can define the initial configuration for the areas shown in the following

illustration by modifying the corresponding plug-in file for that functional area

Configure Client Connectivity

You can use one of several client applications to connect with Visual Studio Team

Foundation Server 2012 (TFS) to manage your product lifecycle using work items version

control build definitions and test plans and test cases suites All clients require that you

connect to a server that runs TFS and select a team project collection and a team project

All clients require that you have the required permissions to access the team projects that

you select

Visual Studio plug-ins and Team Foundation clients

The following clients except for Team Web Access and Team Explorer Everywhere are

installed when you install one of the editions of Visual Studio 2012 Team Web Access is

automatically installed and updated when TFS is installed or updated

Team Web Access provides a web interface to Team Foundation Server that grants

access to team projects Agile planning and tracking tools version control and builds

Team Web Access - Work Item View Only (WIOV) provides users within an

organization without CAL to create view and modify only those work items that they

have created This includes bugs feedback responses and other work item types

Team Explorer provides access to team projects work item tracking code reviews

version control and builds It is installed with each version of Visual Studio 2012 or

you can install Team Explorer from the Microsoft download center as a standalone

client and on as many physical devices as you like

Team Explorer Everywhere Your team can collaborate from Eclipse or from the

command line on the operating system of your choice and improve the predictability of

your development processes by using Team Explorer Everywhere Team Explorer

Everywhere includes both the Team Foundation Server plug-in for Eclipse and the

Cross-platform Command-Line Client for Team Foundation Server

Microsoft Test Manager You can use Test Manager to define your test effort and

create and run manual tests Test Manager also integrates with the work item

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 27: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

database in Team Foundation to create and track bugs that are found during test

efforts Test Manager installs with Visual Studio Premium Visual Studio Ultimate or

Visual Studio Test Professional

Microsoft Feedback Client allows stakeholders to launch an application capture

their interaction with it as video and record verbal or type-written comments

Feedback is stored in TFS to support traceability Stakeholders can download the tool

for free To connect to Team Foundation Server to record and save feedback

stakeholders must have required permissions

Office integration clients

A Team Foundation add-in is installed into each of the following Microsoft Office products

when you install any edition of Visual Studio 2012 or Visual Studio Team Explorer 2012 The

add-in requires Office 2007 version or later

To work online from one of these clients or to link a storyboard to a work item you must

connect to TFS

Excel With Excel you can add or bulk edit work items to TFS to help manage your

project and stay synchronized with the work item database In Excel a Team

tab provides access to a set of features for connecting to a team project importing

work items from a query and publishing or refreshing a work item list

PowerPoint Storyboarding allows you to illustrate user stories and requirements

using PowerPoint The Team Foundation add-in supports linking storyboard files to

Team Foundation Server This add-in installs with one of the supported Visual Studio

2012 editions listed in the table below

Project With Project you can plan projects schedule tasks assign resources and

track changes to manage TFS data You have access to features that TFS doesnrsquot

support such as a project calendar Gantt charts and resource views In Project a

Team menu appears and work items appear as tasks in a project plan

Project Professional Team Foundation Server integrates with Project Server to

enable data to flow from work items in TFS to tasks in enterprise project plans in

Project Server Project managers and software development teams can use the tools

that they prefer work at the level of precision that supports their needs and easily

share information After the two server products are configured the TFS

synchronization engine updates scheduling data and resource usage in both the

mapped enterprise project plan and team project

Configure TFS VC to use Proxy Server

You can configure Team Foundation version control to use a proxy server which caches

copies of version control files in the location of a distributed team You may reduce

bandwidth requirements for remote developers by using a proxy server

To perform this procedure you must be a member of the Users security group on the

computer on which you are configuring Team Explorer

To configure Team Explorer to use Team Foundation Server Proxy

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 28: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Launch Microsoft Visual Studio 2012

2 On the Tools menu choose Options

The Options dialog box appears

3 Expand Source Control and then choose Visual Studio Team Foundation Server

4 Select the Use proxy server for file downloads check box

5 In the Proxy server name box type the name of the computer that is hosting Team

Foundation Server Proxy

6 In the Port box type the port number for Team Foundation Server Proxy and then

click OK

Team Foundation Server Proxy typically listens for client requests on port 8081

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 29: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administer version control

Create and manage workspaces

Your workspace is a local copy of your teamrsquos codebase Your workspace enables you to

develop and test your code in isolation on your dev machine until you are ready to check in

your work

To add edit or remove a workspace choose Workspaces on the Workspace menu in Source

Control Explorer The Manage Workspaces dialog box appears

Choose Show remote workspaces if you want to view all the workspaces you own (including

those on other computers)

VC FileFolder Operations

DeleteRestore Files and Folders

You can delete files and folders and also restore them from both your dev machine and the

server

To delete an item

1 In either Solution Explorer or Source Control Explorer browse to the folder or file

that you want to delete

2 Select the items that you want to delete open their shortcut menu and choose

Delete

3 When you are ready check in your changes

Restore items you deleted from your dev machine using Visual Studio

If you have not yet checked in your delete change in Solution Explorer the Pending

Changes page or Source Control Explorer select the items open their shortcut menu and

choose Undo or Undo Pending Changes

If you or one of your teammates has checked in a delete change to the server you can

restore the item as long as no one on your team has destroyed it

To restore an item deleted from the server

1 From the menu bar choose Tools Options

2 On the Options dialog box navigate to Source Control Visual Studio Team

Foundation Server

3 Select Show deleted items in the Source Control Explorer and then choose OK

4 From the menu bar choose View Other Windows Source Control Explorer

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 30: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

5 In Source Control Explorer navigate to the folder that contains the item you want to

restore

6 Open the itemrsquos shortcut menu and then choose Undelete

When you use a local workspace Visual Studio detects and enables you to resolve changes

you have made outside the system

To use a local workspace to restore an item you deleted outside Visual Studio

1 In Team Explorer choose

2 Home and then choose Pending Changes

3 In the Excluded Changes section choose the Detected changes link

4 In the Promote Candidate Changes dialog box select an item for which delete

appears in the Change column open its shortcut menu and choose Restore this item

Use a server workspace to restore an item you deleted outside Visual Studio

When you accidentally delete an item outside Visual Studio and you are using a server

workspace when you try to open the item in Visual Studio you may see an error message

such as TF10187 Could not open document file name The system cannot find the file

specified You can restore the item by getting it from the server

To use a server workspace to restore an item you deleted outside Visual Studio

1 In Source Control Explorer browse to the folder that contains the deleted items

2 Open the shortcut menu of the folder and choose Get Specific Version

3 On the Get dialog box select Overwrite all files even if the local version matches the

specified version

Choose Get

Enable Policies

Configure Check-Out Settings

Administrators of Team Foundation version control can configure source control check-out

settings Check-out settings in Team Foundation version control enable files to be edited by

more than one person at the same time The following procedure shows you how to

configure check-out settings

Required Permissions

To configure check-out settings you must have the Edit project-level information set to

Allow For more information see Team Foundation Server Permissions

To configure checkout settings

1 In Team Explorer select the team project for which you want to configure check-out

settings

2 From the Team menu click Team Project Settings and then click Source Control

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 31: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

3 In the Source Control Settings dialog box select the Check-out Settings tab

4 Select or clear the Enable multiple checkout box

5 Select or clear the Enable get latest on check-out box

6 Click OK

Enable Team Foundation Version Control to Get the Latest Files on Check-Out

You can configure Team Foundation version control to get the latest version of a file when

you check it out When this option is enabled the check-out behavior is like Visual

SourceSafe For more information about how the check-out settings work see Team

Foundation Check-Out Settings

Required Permissions

To configure check-out settings at the team project level you must have the Manipulate

security settings permission set to Allow

Controlling Check-Out Behavior for a Team Project

The following procedure controls the check-out behavior for all users on a team project If

you enable the get-latest-on-check-out option this option is forced for all team members

who use the team project They cannot override the setting If you do not enable the get-

latest-on-check-out option a team member can still enable it on his or her own computer

To enable or disable get latest on check-out for a team project

1 From the Team menu click Team Project Settings and then click Source Control

2 In the Source Control Settings dialog box select the Check-out Settings tab

3 Select or clear the Enable get latest on check-out box

4 Click OK

The following procedure controls the check-out behavior for your computer This affects all

Team Foundation Server clients that are installed on your computer This includes the tfexe

command line utility and third-party client software

To enable or disable get latest on check-out for your computer

1 From the Tools menu click Options

2 In the Options dialog box expand Source Control and select Visual Studio Team

Foundation Server

3 Select or clear the Get latest version of item on check out box

4 Click OK

5 Local Vs Server Workspace

When you create or edit a workspace you can specify whether its location is Local or

Server In most cases local is best because it provides several advantages Most notably

you can perform core version control operations even when youre not connected to your

Team Foundation Server

Understand Why should I use a local workspace

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 32: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

There are a lot of things to love about a local workspace

Work offline easily You can quickly begin editing a file when your network connection is

unavailable or unreliable From Solution Explorer you can add edit delete rename undo

and compare items in your workspace even when youre not connected to your Team

Foundation Server

Easily restore files that you have deleted locally To restore locally deleted files just

get your files

Visual Studio automatically detects changes When you add or delete files outside of

Visual Studio the program automatically detects these changes

Understand When might I need to use a server workspace

Even though a local workspace is a better option for most people there are some special

cases when you might find a server workspace useful

Performance degrades as the number of items in a local workspace increases

A workspace that contains a very large number of files Visual Studio keeps only one

copy of each file in a server workspace which reduces the disk space required to store

them

You can use Visual Studio 2010 and earlier versions to work with the workspace

The Enable get latest on check-out option is available

Some challenges you face if you use a server workspace

Work offline with difficulty and with poor performance When you are offline you cannot

work with your local files because they are read-only until you check them out You can

check out files only from Solution Explorer and only after you switch to offline mode (as

explained below) While youre offline you cant perform any other operations such as add

delete rename or undo

The default setting for new Team Projects in TFS 2012 is ldquoLocal Workspacerdquo

If you migrate from TFS 2010 or TFS 2008 all projects have Server Workspaces

The most important things

Local workspace allow you to work offline easily

Local workspace cannot have check out locks on files You cannot claim a file

exclusively

Migrated Team Projects have Server Workspaces

The default workspace type is configurable at Team Project Collection Level

Workspace types can be mixes Some users have local some users have server

workspaces

Such an item depends on whether you are using a local or a server workspace See Decide

Between Using a Local or a Server Workspace

Unlock Other Users Checkout

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 33: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Discards one or more pending changes to files or folders

tf undo [workspaceworkspacename[workspaceowner]] [recursive] itemspec [noprompt]

[loginusername[password]] [collectionTeamProjectCollectionUrl]

Remove pending changes to a file

ccodeSiteAppMainSolutionAProject1gttf undo programcs

Removes all pending changes to programcs

Recursively remove pending changes to all items in a folder

ccodeSiteAppMaingttf undo recursive

Removes all pending changes in the ccodeSiteAppMain folder and all its subfolders

Remove pending changes to a file in a remote workspace

cgttf undo collectionhttpfabrikam-38080tfsDefaultCollection workspaceFABRIKAM-

1JuliaI $SiteAppMainSolutionAProject1programcs

Removes all pending changes to programcs in the specified collection and workspace

Deleting a Shelveset

Stores a set of pending changes together with pending check-in notes a comment and a

list of associated work items on the server that is running Visual Studio Team Foundation

Server without actually checking them into the version control server

tf shelve [replace] [comment(comment|commentfile)] [shelvesetname]

[validate][noprompt] [loginusername[password]]

Examples

The following example creates a new shelveset on the Team Foundation Server called

Reflector_BuddyTest assigns ownership to the user Hans then returns all items in the

current workspace to the latest version downloaded during the last get operation and a

sets a read-only state

cprojectsgt tf shelve Reflector_BuddyTestHans move

The following example deletes the existing shelveset new-feature from the server

creates a new shelveset by that name and retains all pending changes in the current

workspace

cprojectsgt tf shelve new-feature replace

The following example creates a shelveset named HelloWorld_TestMe that includes all

pending changes to all cs files in the Cprojects working folder and its subfolders

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 34: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

cprojectsgt tf shelve HelloWorld_TestMe cprojectscs recursive

The following example deletes the HelloWorld_24 shelveset

cprojectsgt tf shelve HelloWorld_24 delete

Configure version control proxy

Visual Studio Team Foundation Server provides support for distributed teams to use version

control through the Team Foundation Server Proxy Team Foundation Server Proxy

manages a cache of downloaded version control files in the location of the distributed team

By configuring the client to use Team Foundation Server Proxy you can significantly reduce

the bandwidth needed across wide area connections In addition you do not have to

manage downloading and caching of version files management of the files is transparent to

the developer who is using the files Meanwhile any metadata exchanges and file uploads

continue to appear in Team Foundation Server

Installing Proxy

Change Cache Setting

You can change the settings for the version control file cache by editing the Proxyconfig

file on the server that is running Team Foundation Server Proxy By default this file is

located in the installation directory for Team Foundation Server Proxy

You can use Proxyconfig in the following ways

Determine the location of the cache root folder

Change the cache limit beyond which old files are removed from the cache

Change the amount of space to free when old files are removed

Change the interval for saving information about cache performance to a file

After you perform one or more of these tasks you must recycle the application pool by

using the IISRESET command to retrieve the most recent version of Proxyconfig

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the server that is running Team Foundation Server Proxy

Even if you are logged on with administrative credentials you may have to take these

precautions on computers that are running Windows Server 2008 or Windows Vista

To follow a command-line procedure you might have to open an elevated Command

Prompt Click Start right-click Command Prompt and then click Run as Administrator

To modify Proxyconfig you might have to open a text editor as an administrator To

open Notepad as an administrator click Start right-click Command Prompt click Run

as administrator and then type notepad In Notepad locate the Proxyconfig file by

using the path in Configuration File

To open the Proxyconfig file

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 35: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

1 Click Start point to All Programs point to Microsoft Team Foundation Server 2010

and then click Team Foundation Administration Console

Team Foundation Administration Console appears

2 Click Proxy Server and then click the path in Configuration File

To determine the specified cache root folder

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheRootgt element which contains the location of the cache root

folder in the file system

ltCacheRootgtCacheRootFolderLocationltCacheRootgt

To change the limit at which old files are removed from the cache

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheLimitPolicygt element

3 Perform one of the following tasks

To specify a percentage of available disk space to fill before old files are

removed from the cache update the ltPercentageBasedPolicygt element

For example the following line specifies that the cache should fill up to 60

capacity of available disk space before old files are removed

ltPercentageBasedPolicygt60ltPercentageBasedPolicygt

To specify a fixed number of megabytes (MB) for the cache to reach before

old files are removed add or update the ltFixedSizeBasedPolicygt element

For example the following line specifies that the cache should reach 500 MB

before old files are removed

ltFixedSizeBasedPolicygt500ltFixedSizeBasedPolicygt

4 Save and close the Proxyconfig file

5 Open a Command Prompt window type iisreset and then press ENTER

To change the amount of cache to free when removing old files

1 Open Proxyconfig in a text or XML editor

2 Locate the ltCacheDeletionPercentgt element and then update it by changing the

percentage of cache space to free when old files are removed

For example the following line specifies to free 50 of the cache when old files are

removed

Copy

ltCacheDeletionPercentgt50ltCacheDeletionPercentgt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file that is

named ProxyStatisticsxml These statistics are tracked by performance counters that are

installed by default The ProxyStatisticsxml file is located in the App_Data folder in the

installation directory for Team Foundation Server Proxy

You can view these performance statistics from the Performance monitor or by using the

ProxyStatistics Web service For more information see How to Examine Cache Performance

By Using Performance Monitor

To change the interval for saving performance statistics to a file

1 Open Proxyconfig in a text or XML editor

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 36: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Locate the ltStatisticsPersistTimegt element and then update it by changing the

number of hours for each interval

Note

The default and minimum interval is one hour The maximum interval is 24 hours

For example the following line specifies that the statistics should be saved every two

hours

Copy

ltStatisticsPersistTimegt2ltStatisticsPersistTimegt

3 Save and close Proxyconfig

4 Open a Command Prompt window type iisreset and then press ENTER

Proxy Cache Performance

As an administrator for Visual Studio Team Foundation Server you might want to examine

the performance of the version control cache on a computer that is running Team

Foundation Server or Team Foundation Server Proxy By default performance counters are

installed and you can view their statistics by opening Performance Monitor or by using the

ProxyStatistics Web service For information about how to use Performance Monitor to view

cache performance see How to Examine Cache Performance By Using Performance

Monitor

For example you can view statistics for the following counters

Current cache size

Total cache hits

Total download requests

Total files in cache

These statistics are saved at set intervals to the ProxyStatisticsxml file For information

about how to change the length of the intervals and other cache settings see How to

Change Cache Settings for Team Foundation Server Proxy

Required Permissions

To perform this procedure you must be a member of the Administrators security group on

the computer whose performance you want to monitor

In addition to these permissions you might need to address the following requirements on a

computer that is running Windows Server 2008 or Windows Vista

To follow a procedure that requires Internet Explorer you might need to start it as

an administrator by clicking Start clicking All Programs right-clicking Internet

Explorer and then clicking Run as administrator

To access Web sites or Web services you might need to add one or more sites to the

list of trusted sites in Internet Explorer or start Internet Explorer as an administrator

For more information see the Microsoft Web site

To view cache performance by using the ProxyStatistics Web service

1 Log on locally or open a Remote Desktop connection to the server whose

performance you want to monitor

Note

You must be logged into the server that hosts the ProxyStatistics Web service to invoke

the QueryProxyStatistics operation

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 37: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

2 Open Internet Explorer and type one of the following URLs in the Address bar

For Team Foundation Server using the default settings for port and virtual

directory httplocalhost8080tfsVersionControlv10proxystatisticsasmx

For Team Foundation Server Proxy using the default settings for port

httplocalhost8081VersionControlProxyv10ProxyStatisticsasmx

The Web page for the ProxyStatistics Web service appears

3 Click QueryProxyStatistics and then click Invoke

An XML output file opens that contains statistics about the cache performance For

example the output might resemble the following text

ltProxyStatisticsInfo CurrentCacheSize=356352 NoOfRequests=82

OverallCacheHits=41 NoOfFilesInCache=41 OverallCacheMisses=41

CacheHitsPercentage=50 CacheMissPercentage=50 gt

Note

The following statistics are calculated at run time OverallCacheMisses

CacheHitsPercentage and CacheMissPercentage

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 38: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Useful Resources

TFS Installation Guide httpwwwmicrosoftcomen-

usdownloaddetailsaspxid=29035

Build Controller httpmsdnmicrosoftcomen-uslibraryvstudiodd793166aspx

Build Agent httpmsdnmicrosoftcomen-uslibraryvstudiobb399135aspxprops

Test Agent httpmsdnmicrosoftcomen-uslibraryvstudiodd648127aspx

SCVMM httpmsdnmicrosoftcomen-uslibraryvstudiodd380687aspxSCVMM

Create Team Project httpmsdnmicrosoftcomen-uslibraryvstudiodd273726aspx

Split TPC httpmsdnmicrosoftcomen-uslibraryvstudiodd936158aspx

CreateDelete Snapshots httpmsdnmicrosoftcomen-

uslibraryvstudioff427550aspx

Security httpmsdnmicrosoftcomen-uslibraryvstudiojj159364aspx

Tests in Your Build Process httpmsdnmicrosoftcomen-

uslibraryvstudioms25313828v=vs11029aspx

Build Triggers httpmsdnmicrosoftcomen-

uslibraryvstudiohh19071828v=vs11029aspx

Step-by-Step Customization Process httpmsdnmicrosoftcomen-

uslibraryvstudioms24388228v=vs11029aspx

Customize Functional Areas within a Process Template

httpmsdnmicrosoftcomen-uslibraryvstudioms40073428v=vs11029aspx

Working with Team Foundation Clients httpmsdnmicrosoftcomen-

uslibraryvstudioms18130428v=vs11029aspx

Query for bugs Task httpmsdnmicrosoftcomen-

uslibraryvstudiodd286705(v=vs110)aspx

Create Workspace httpmsdnmicrosoftcomen-uslibrarycc138514(v=vs110)aspx

Decide Between Using a Local or a Server Workspace

httpmsdnmicrosoftcomen-uslibrarybb892960(v=vs110)aspx

httpblogsmsdncombvisualstudioalmarchive20121005set-local-workspaces-as-

default-when-upgrading-to-tfs-2012aspx

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093

Page 39: Team Foundation Server Administration Certification (70-496) … · 2016-08-23 · Via TFS Administration UI (On the TFS AT Server) On the TFS application-tier, open the administration

Notes By Deepak Khare httpblogsmsdncombdeepakkhare

Administering Visual Studio TFS 2012 Jump Start (Online Training)

httpwwwmicrosoftvirtualacademycomtraining-coursesadministering-visual-studio-tfs-

2012-exam-496-jump-start

Book httpwwwamazoncomProfessional-Team-Foundation-Server-

2012dp1118314093