Beruflich Dokumente
Kultur Dokumente
Whitepaper
Author:
Wipro Confidential
Date 27-08-2013
Whitepaper
Table of Contents Part 1 - Introduction and Overview ...............................................................................................................................4 Chapter 1: Introduction .............................................................................................................................................4 1.1 Overview .........................................................................................................................................................4 1.2 What is TFS? ....................................................................................................................................................4 1.3 Who is the Client of TFS? ................................................................................................................................4 Chapter 2: Architecture and System Requirements ..................................................................................................5 2.1 Architecture ....................................................................................................................................................5 2.2 Hardware Requirement ..................................................................................................................................7 2.3 System Requirement .......................................................................................................................................7 Part 2 Installing and Configuring Team Foundation Server ........................................................................................9 Chapter 3: Installation ...............................................................................................................................................9 3.1 Instilling Team Foundation Server ..................................................................................................................9 Chapter 4: Configuration .........................................................................................................................................12 4.1 Configuring Team Foundation Server ...........................................................................................................12 Part 3 Working with Team Foundation Server .........................................................................................................17 Chapter: 5 Connecting to TFS and adding Projects to TFS ......................................................................................17 5.1 How to connect to Team Foundation Server ................................................................................................17 5.2 How to add projects to source control .........................................................................................................20 5.3 How to check in the code to source control .................................................................................................22 5.4 How to check out the code from source control ..........................................................................................23 Chapter: 6 Basic Functionalities in TFS ....................................................................................................................25 6.1 How to apply label ........................................................................................................................................25 6.2 How to get latest version ..............................................................................................................................25 6.3 How to get Specific version ...........................................................................................................................26 6.4 How to View Pending Changes .....................................................................................................................29 6.5 How to lock ...................................................................................................................................................31 6.6. How to Shelve and Unshelve Pending Changes ...........................................................................................32 6.7 How to View History .....................................................................................................................................35 6.8 How to compare a code ................................................................................................................................35 6.9 How to get a code from TFS ..........................................................................................................................38 6.10 Binding or Unbinding a Project from Source control ..................................................................................40 References ...................................................................................................................................................................41
Wipro Confidential
Date 27-08-2013
Whitepaper
Wipro Confidential
Date 27-08-2013
Whitepaper
Wipro Confidential
Date 27-08-2013
Whitepaper
Build Work Items Reporting Eclipse Source Control Build Work Items Excel Reporting Work Items
Project Work Items Web Access Source Control(read) Work Items Reporting Share Point Reporting Documentation
SCVMM Lab Management TFS Admin Admin TFS Power Tools Admin
Wipro Confidential
Date 27-08-2013
Whitepaper
2.1.2 Physical Architecture It is possible to create single tier architecture for installations which do not demand high scalability. It is suggested that for any non-trivial installation the data layer and the application layer should be on different servers to meet the scalability and reliability requirements. For meeting the requirements of teams which are geographically scattered and connected through internet, TFS provides the ability to use proxy to fulfill the requirements of distant users. Although proxy will be caching the source code, main source control where changes are allowed to be stored is where the main installation of TFS is. It is also suggested to have a separate build server since the build activity is very highly CPU intensive. Keeping the main TFS and build server on same machine with frequent builds may hamper the performance of TFS adversely.
Wipro Confidential
Date 27-08-2013
Whitepaper
Wipro Confidential
Date 27-08-2013
Whitepaper
Team Foundation Server does not support the Server Core installation option for either Windows Server 2008 or Windows Server 2008 R2. If you are installing Team Foundation Server or SQL Server on Windows Server 2008 R2, you must have .NET Framework 3.5 installed. On Windows Server 2008 R2, you can install .NET Framework 3.5 by using the Add Features Wizard from Server Manager. If you are installing Team Foundation Server on Windows Server 2008 R2 or Windows 7, an issue with HTTP.sys may affect network connectivity.
Wipro Confidential
Date 27-08-2013
Whitepaper
Wipro Confidential
Date 27-08-2013
Whitepaper
6. In the feature selection screen select the features you want to install and the install location. Then click Install and wait for the installation to complete.
10
Date 27-08-
Whitepaper
7. In the final installation screen make sure the Launch Team Foundation Server Configuration Tool checkbox is checked and then click Finish.
11
Date 27-08-
Whitepaper
Chapter 4: Configuration
4.1 Configuring Team Foundation Server
8. The Team Foundation Server Configuration Wizard will start now. Select Basic in the left panel of the wizard start screen and click Start Wizard.
12
Date 27-08-
Whitepaper
10. In the SQL Server selection screen select SQL Server Express if you dont have any SQL Server instance installed on your machine. Otherwise that option will be disabled and you can choose your SQL Server instance. Then click Next.
13
Date 27-08-
Whitepaper
12. In the Readiness Checks screen wait until your proposed configuration passes all validations and then click Configure.
14
Date 27-08-
Whitepaper
13. Wait until the wizard configures all required stuff and click Next.
14. Your TFS 2010 Beta 2 is now installed and configured. Click Close in the final screen to finish the configuration.
15
Date 27-08-
Whitepaper
15. You can always check the details on your TFS configuration by going to the new Team Foundation Server Administration Console that you will find in Start Menu > Microsoft Team Foundation Server 2010 Beta 2. Some cool facts in this installation are: You no longer need a server OS for TFS. Your Windows 7 machine is just fine for the Basic configuration. The installation is now separated from the configuration. You install the bits once and can configure/reconfigure TFS many times in the future. This will allow you to change your configuration depending on your future environment needs without performing a full installation each time. The installation/configuration is very easy. You dont need to worry about having IIS installed and configured appropriately, and the same applies for SQL Server. The wizard will take care of everything to make sure you go from zero to a complete TFS installation with only a few clicks. You can now use SQL Server Express for your Basic configuration. The wizard will also install it if you dont have it. The Readiness Check is a huge time saving step. It will make sure your configuration will actually work before starting the configuration process. In previous versions you might need to wait until being in the middle of the installation process just to get an alert that tells you that you gave incorrect configuration data.
16
Date 27-08-
Whitepaper
Part 3 Working with Team Foundation Server Chapter: 5 Connecting to TFS and adding Projects to TFS
5.1 How to connect to Team Foundation Server
1. Open Visual Studio go to Tools -> Options and check whether Visual Studio Team Foundation servers plug in was installed or not.
17
Date 27-08-
Whitepaper
3. Click Servers
4. Click Add
To correctly access TFS 2010, you are required to enter using the following syntax http://<servername>:<port>/tfs/<collectionname> Example: https://sww-swdw-team.shell.com/tfs/test
18
Date 27-08-
Whitepaper
5. Enter the URL to your TFS 2010 server into the Add Team Foundation Server textbox
19
Date 27-08-
Whitepaper
20
Date 27-08-
Whitepaper
2. Select the respective folder in the TFS were you want to add you projects and click ok
3. There will be + symbol in front of the Project solutions, package s and whatever
items are in project.
21
Date 27-08-
Whitepaper
5. And give your comments in the comment text box and click Check In.
22
Date 27-08-
Whitepaper
6. Once the code was added to Source Control, there will be lock symbol in the solution, package and other items in project.
23
Date 27-08-
Whitepaper
8. Select the lock type options None, Check Out or Check In and click Check Out.
9. Once the code was Checked Out from source control, you can see the tick mark in the project solution.
24
Date 27-08-
Whitepaper
25
Date 27-08-
Whitepaper
2. Click on the Type list box in Version section, we you can see the 4 different options. Select the required option and click Get.
26
Date 27-08-
Whitepaper
a) All Changes: It will brings you all the change of code in TFS. b) Changeset Number: If you have a changeset number, give the number in from and to tab. c) Created Date: If you have date when you checked in the code give the date between and date. Select the appropriate option which you required and click on Find then you can see the details in Result section and click Ok.
27
Date 27-08-
Whitepaper
28
Date 27-08-
Whitepaper
29
Date 27-08-
Whitepaper
check-in notes, and any policy warnings that are caused by this check-in. You can also compare the pending change with another version of the file. You can commit specified pending changes by performing a check-in to Team Foundation version control. Before you check in your pending changes, use the Get Latest command to download the most recent sources from the server, and then compile your code to make sure that it does not break the build. As part of your check-in, you can associate or resolve work items with the changeset and you can provide check-in notes. You can review adherence to check-in policy for the changes. These policies are configured by an administrator and if necessary, the policies can be overridden. You must resolve any conflicts that are caused by your pending changes. If conflicts occur, a dialog box appears, and you must resolve them before you can complete the operation.
If you have made changes to one or more files that are under version control and you want to discard those changes, you can undo those pending changes. You might do this if a change is believed to be too risky, or if testing determines that the change introduces new quality or performance issues. If you have already checked in the change and want to revert it, you must instead roll back the change. You cannot roll back changes by using Team Explorer Everywhere. You must instead use the command-line client for Visual Studio. When you revert changes, you will be prompted to confirm the operation for any files that have changed. You will not be prompted if any of the following conditions are true: The pending change is not of type edit. The pending change has no working folder mapping. This should occur only if the mapping was removed.
30
Date 27-08-
Whitepaper
31
Date 27-08-
Whitepaper
Disabled if a member of the Administrators security group of your team project collection has enabled asynchronous checkout for your teams server workspaces.
A check-out lock prevents users who are using server workspaces from checking out and making changes to the locked item in their workspaces. You cannot apply a check-out lock to an item for which any pending changes exist, in any workspace other than your own.
The Shelve - Source Files dialog box includes two options: Preserve pending change locally
32
Date 27-08-
Whitepaper
By default, this option is selected. When this option is selected, the changes you made to the files or folders in your local workspace are preserved. Evaluate Policies and check-in notes before shelving
When this option is selected, all check-in policies are evaluated before the shelveset is created. For more information, see Set and Enforce Quality Gates. In the Comment box, type Testing my shelveset, and then click Shelve. The files and folders are copied to the version control server and are available for other team members to unshelve.
Unshelving When you unshelve a shelveset, Team Foundation restores each shelved revision to the destination workspace as a pending change as long as the revision does not conflict with a change that is already pending in the workspace. The two most common reasons why you might want to unshelve a shelveset are: No-touch code reviews (or workspace impersonation). Integrate shelved pending changes into your work in the future.
33
Date 27-08-
Whitepaper
1. In Team Explorer, click File, point to Source Control, and then click Unshelve Pending Changes. 2. The Unshelve dialog box appears. 3. In the Owner name box, type the alias of the person who created the shelveset (for example, ADVENTUREWORKS\JuanGo or just juango), and then click Find. 4. In the Results pane, select the shelveset your workspace, and then click Details. you want to unshelve into
5. In the Shelveset Details dialog box, if you want to delete the shelveset from the Team Foundation version control server, clear the Preserve shelveset on server box. 6. As an option, clear the Restore work items and check-in notes option if you do not want to restore the work items and check-in notes that are associated with the shelveset. 7. Select the shelveset or shelveset items that you want to unshelve into your workspace, and then click Unshelve. Unlike the Get operation, which merges reconcilable differences between two versions of a file automatically and helps you merge conflicts manually, the unshelve operation does not support merges. By removing shelved pending changes from your workspace at the commencement of the code review, you can be assured that any changes that your reviewer makes to the shelveset, such as adding comments to a file, do not create merge conflicts during the unshelve process.
34
Date 27-08-
Whitepaper
Comparing Files
With the Difference Viewer, you can compare two versions of a file. The following procedures demonstrate how to compare two files both from Solution Explorer and Source Control Explorer.
35
Date 27-08-
Whitepaper
2. In the Compare to text box, either type the path and name for the file that you want to compare your selected file to, or click the ellipses () to open the Open dialog box from which you can locate the file that you want to compare to. 3. In the Compare by list box, choose the version that you want to compare by: o Changeset o Date o Label o Latest Version o Workspace 4. Click Compare, if the files have no differences, the Microsoft Visual Studio dialog box appears informing you that the files are identical, click OK. Otherwise, the Difference Viewer appears.
36
Date 27-08-
Whitepaper
5. In the Difference Viewer, the differences will be highlighted. You can use the toolbar to navigate between all the areas in the file where differences are detected. 6. When you are finished comparing the files, exit the Difference Viewer.
37
Date 27-08-
Whitepaper
2. In Manage Workspace wizard select your workspace(system were you saving your
code).
38
Date 27-08-
Whitepaper
3. Then in Edit Workspace wizard under Working folders select the path of you project in Source Control Folder. 4. After selecting the path for Source Control, select the local path were you need your code to be placed, once Source control Folder and Local Folder was selected click Ok.
5. Then Right click on your project folder in Source control and select Get Latest Version, the latest version of code from TFS will now present in the local folder.
39
Date 27-08-
Whitepaper
40
Date 27-08-
Whitepaper
2. In Change Source Control wizard, to Bind you project to Source control select your project and click Bind then your project will be bind to TFS.
References
http://msdn.microsoft.com/en-us/library/ http://blogs.msdn.com/b/visualstudioalm/
41
Date 27-08-