Tutorial: Getting started With TFS in vs2010
[Original post address] Tutorial: Getting started With TFS in vs2010
[Original article posting time] Wednesday, October 21,200 9 pm
At the beginning of this month, we released the new basic TFs configuration. This configuration facilitates the establishment of a TFs version that supports source code management, work items and build (builds. This is a good opportunity to migrate your resources on VSS (visual source safe) to TFS, and you can also choose some new features. Now the official version of vs2010 beta2 has been released. The following is the Getting Started Guide for this system.
This article will be most helpful to those who have not installed or used TFs. TFS has good support for complex environments. For example, the integration of reports and SharePoint supports cross-domain and distributed databases. However, I am not going to talk about any part here. My goal is to help you understand why we want to choose TFs and how to use it. If you are a user of VSS, I will describe how to migrate the VSS database to TFs in future articles.
In, each system has an independent storage space, resource identification set, command and tool set. To make the entire system work, it is like connecting a set of custom three-dimensional components: this can be achieved, but it has a huge workload and may cause leakage in some places.
What I want is a system that can integrate these jobs and implement my default workflow.
This integration has implemented some very common scenarios. For example, every day I edit the source code, generate a product, test it, report a bug, fix it, and repeat it. When an integrated system supports all these workflows, all the work can be associated. For example, when I check in bug fixes, I 'd like to see that this change set can be recorded when those defects are resolved. (See the example below)
The basic configuration of TFS allows you to precisely implement this. This is a huge improvement compared with simple source code management. The full version of TFS will add some new features, including automated testing, virtual lab deployment, and architecture verification. The following is the extended workflow:
When you use Visual Studio enhanced edition and flagship edition, you can choose to install these new components as needed.
There are many ways to access TFs. Developers often access it Through Visual Studio. Testers can access TFs through the new test and Lab Manager (no need to install ). If you are a project manager, you can also access TFs through the web interface, Excel, Microsoft Project, or dashboards MOSS support (new function of vs2010. More information will be introduced later.
In the rest of this article, I will gradually introduce you how to use basic configuration to start our first TFs project.
Getting started
Now, with a conceptual understanding, it is time to connect them. Start with the steps listed in Brian Harry's TFs article. All necessary software will be installed on your machine in the form of a default set (creatively called defaultcollection.
Here we can connect to TFs Through Visual Studio. The simplest way to do this is to use the menu "team" (you can also use the link on the start page ):
Enter the TFS server name. For example, my Windows 7 machine: jlzb2rel. Add the server to the list by clicking the Add button, and then click Close:
Here, you can select a server from the combo box, select defaultcollection, and then click Connect:
Now the team Resource Manager tab has the server connection and defaultcollection, but we do not have a TFs project that can store things:
I have created a new Windows Forms project for this tutorial as a sample solution (file, new project, Windows Forms ). If you try to add a new code project to source code management, an error will occur. For example:
After you select the "add solution to source code management" menu item, you will get the error message "no available team project source code management folder:
This error is not intuitive (especially the word projects provided are used in TFs and your code solutions, but they are different concepts ). This error means that you must create a real TFs project to include useful resources in your work. In the team resource manager, right-click your set and choose create Team Project:
Here I will create a TFs project for the Account Payable system. This project will contain all the solutions and data required by the entire system. After entering the required information, click Next:
The default is the agile template, but you can also select the cmme template. For more details about the template type, go to msdn. If you are using agile methods (such as TDD), this is a good choice. Click Finish.
Various status updates are available during project creation.
After the operation is successful, click the close button:
The team resource manager displays the project, which includes work items, generation, and source code management:
You can update the project set. Add a solution to TFs: Right-click the project in Solution Explorer and select "add solution to source code management ":
In this case, you can create a folder for the solution in TFs or use the default value. If you are ready, click OK.
At this point, you can see in Solution Explorer that all files are under source code management. (View "+" in front of the file)
At this point, you can see the actions that the listed source code manager can take to publish a solution. Add comments and click "check in:
Click to confirm the check-in.
At this time, the new solution is in TFs and work items can be started.
Work Item
You can directly use the team resource manager in Visual Studio or use the Web Front-end and test and lab management tools to create a project. Open the team resource manager and expand the team queries items under the work item to browse your project. You can also double-click any query option (such as active bugs) to view any project you can see.
Because our TFs project is empty, there is no active bug in the list.
Create a new bug and select team to create a new project. You can create multiple work items to track features and defects. Select bug continue:
Fill in relevant information for this new bug, and click Save project item to submit it to the database.
If you refresh the active bug query list, you will see this new bug:
Now add a real bug to fix our project. In my example, a default Windows Forms Application is created. To update the title:
Now we need to fix this bug. Return to Solution Explorer, select form1.cs, and select "check out for editing ":
Click "check out" to confirm:
Now there is a tick mark next to the file so that you know it can be edited:
When you update the text attribute of the Main Window, vs automatically checks out any dependent files:
This example is a Windows Forms application, but it also supports all other solution/project types. Now we are satisfied with the code changes. Select the "pending changes" tab at the bottom of.
In this example, we fixed a bug, so click the "work item" icon:
Select bug #6 to track our title errors. We want to solve it through this check-in:
Add comments and click in. Then click "yes" to confirm.
If you refresh bug #6, you will see that the current status has changed to resolved and the history has been updated.
Note that the "Change set" (source code management change set) has been automatically added to the historical records.
At this time, you can continue to create and fix bugs as required by your project.
Other methods to access TFs
As mentioned above, there is no need to use vs to access TFs. We have already deeply integrated TFs with other clients, such as web pages and office. For example, I can use a web browser to easily connect to my server by using the server name (8080 is the default port): http: // jlzb2rel: 8080/TFS/
Now I can browse my collections and projects. If you select the newly created AccountsPayable project and click "continue", more information will be displayed. In this example, you can find all the bugs in the system by navigating to the work items tag.
This is indeed a simple way to browse your project. It can be installed on any computer without any additional installation. These operations are also supported in Excel, Microsoft Project, and other software. This access method makes it easier for all members of the project to work together.
At this time, you have a very useful tool to easily complete your work. If you are using VSS, This is just exciting. Now you can put down this tutorial and wait for the rest to come back. If you want to try some advanced attributes, such as test scenarios. I will use beta 1 for demonstration in this tutorial.
Generate support
The next typical step of a workflow is to automatically generate a product. If Brian's installation instructions are followed, TFS is now available for local generation on your machine. The first step is to navigate to the team resource manager, right-click "all generated definitions", and select "new generated definition ":
There are a series of definitions to be filled in, just like the property page of a code project:
The trigger page allows us to decide when to start generating. You can choose from the following options:
· Manual items are used by default. We must start our own generation with this item.
· After each check-in, continuous integration is very useful when you want to have a new generation. It allows you to immediately verify the new check-in without waiting for a lot of check-in to be mixed before verification.
· Rolling generation provides a way to handle changes in batches. This method is very convenient when generation takes a little time and you cannot do everything.
· Closed check-in allows you to ensure that all check-ins are generated before being passed in to TFs. Make sure that you do not cause any damage to other members of your project team.
· The scheduler has become a useful attempt for the entire team to generate daily data
You can create and use multiple generation definitions, allowing you to use different types of generation for different purposes.
You can view all tags when you are free of charge (each tag is described in the complete documentation on the product ). however, we need to provide a new storage to solve the yellow warning mark generated by default. Here, I created a public UNC on my machine:
Now you can save the generated definition to TFs. If you go back to the team resource manager, we can "enable new queues ":
In the displayed dialog box, select queue:
This is a generated queued display on the my machine status page:
If you double-click Generate in the queue, you can get the detailed status of this generation:
Here you can see warnings and errors, log files, and navigation to the drop directory. For example, if you select "view log files", you can see the script (subset) generated by execution ):
If you choose to open the drop folder link, you will be taken to our drop location:
Now anyone can choose to generate for their daily tests or publish them to customers.
Now you know that you have used TFs to configure everything.
In the future, I will provide a tutorial on how to install and use the virtual lab system (part of the Visual Studio flagship edition), so that you can deploy complex applications to the hyper-v Environment for automated testing.
Create a new TFs set
[Note: this part is completely optional] if you like you, you can store all your work in a TFs. If you are a visual source safe user, you can skip this part. However, if you want to create a new top-level set, it is quite simple. The first step is to start, and then the basic team management console:
After the console is started, select "Team Project set items" and click the "Create team project set" link:
Enter the name you want to describe for project collection and click "Next ":
Accept the default value of the data layer, and then click "Next ":
The basic configuration of TFS does not support lab management, so proceed directly to the next step:
All the required data is configured here. You can select "verify ":
This information is verified to allow the collection to be created smoothly:
After the verification is complete, click Create:
This step provides everything necessary for every configuration of TFS. Click Next:
You will see a new project set of the default version: