Using Team Foundation Server 2010 to Source Control Visual Studio 2010

Page update date :
Page creation date :

summary

Until now, Visual Studio used Visual SourceSafe for source control, but starting with Visual Studio 2010, you will use Team Foundation Server for source control.

Whereas traditional Team Foundation Server has been complex to set up and pricelessly available, since 2010 it has become easier to install and configure, the price of a single item is not much different from Visual SourceSafe, and even with an MSDN subscription, Professional Since it is always attached to above, it has become easy to use.

Team Foundation Server 2010 を使って Visual Studio 2010 のソース管理を行う

Operating Environment

Supported Visual Studio Versions

  • 2010 (Professional or higher)

Check Visual Studio Version

  • 2010 (Professional)

Visual Studio Team Foundation Server 2010 installation support environment

  • Windows Server 2003, 2003 R2, 2008, and 2008 R2 (all 32-bit and 64-bit are acceptable)
  • Windows Vista, 7 (32-bit and 64-bit are acceptable)

substance

* The tips introduced here only describe the settings until you can source control from Visual Studio. Detailed explanations about source control and explanations of the application of other functions have been omitted, so please try it out or refer to the official site etc.

Visual Studio 2010 and Team Foundation Server 2010, which are used in these tips, are also available for trials. If you do not have the full version, please download and use it from the link below.

Visual Studio Team Foundation Server 2010

Visual Studio 2010 (one of the following)

Client-side source control is not available in Visual Studio 2010 Express Edition. Be sure to use Professionl Edition or higher. Visual Studio is described as already installed.

The first step is to install Team Foundation Server 2010 as a setup for the server that manages the source. Although it is named Server, since the 2010 version, it can be installed not only on Windows Server but also on Windows Vista and Windows 7 client operating systems, so it can be used even by people who do not have a Server product, and it can be easily used such as carrying it around on a notebook PC etc.

The tips in this article show Team Foundation Server 2010 installed on Windows Server 2008 R2.

When you browse to the Team Foundation Server 2010 disk, there are "TFS-x64" and "TFS-x86" folders, and the setup files are located in each folder. Open TFS-x64 if your installation is for x64 OS or TFS-x86 for x86 OS.

Run the "setup.exe" file in the folder.

When the installation screen appears, click Next.

Read the license terms carefully, check "I agree" and click "Next".

If the feature to be installed is not checked, check all of them. After confirming the checks, click the "Install" button.

Wait for a while as the installation will begin.

If the .NET Framework 4.0 is not installed, you will be prompted to restart after installation, so restart it.

Since the installation continues after the reboot, if you have mounted the disk image on a virtual drive or the like, you will need to remount it.

Wait for a while as the installation will continue after rebooting.

When the installation is complete, configure Team Foundation Server, so check "Start Team Foundation Server Offensive Tool" at the bottom left of the screen and click the "Configure" button.

The Team Foundation Server license entry screen appears, and if you have one, enter your product key. If not, it will be used as an evaluation version.

If you want to use it as an evaluation version, you will see a message similar to the one on the right.

The Configuration Center appears.

You will have to choose from three configuration patterns: Basic, Standard Single Server, and Advanced. However, if you install it on a client OS, it will be either Basic or Advanced.

When you select each item from the list on the left, the contents displayed in the wizard and the appropriate setup environment are displayed, so select the wizard according to your environment and click the "Start Wizard" button.

Here we select "Basic" to start the wizard.

Click Next.

Select the SQL Server that you want to use as the database. If SQL Server is not installed in your environment, you can choose to install the free version of SQL Server Express.

SQL Server is already installed in the Tips environment, so check "Use an existing SQL Server instance".

Specify an instance if you are using an existing SQL Server instance. You can test the connection by clicking the Test link on the right.

Review the configuration and click Next.

A check is performed to see if it is configurable. If all are successful, click the Configure button.

We set it to install on an existing SQL Server, but in that case, we had to meet some conditions, such as "full-text search is already installed" and "server memory is at least 2GB". If you really can't clear it, install SQL Server Express.

When you are finished with the configuration, click Next.

When everything is done successfully, close the screen with the "Close" button.

By accessing the URL displayed in the center of the screen, you can manage the team project through a web browser even from the client. However, we will not explain it here.

You will return to the previous screen, but this screen will also be closed.

Other configurations are available, so if necessary, select Configure to start the wizard. You can also start the configuration from the Team Foundation Server Administration Console, which appears later.

When you close the Configuration Center, the Team Foundation Server Administration Console automatically starts.

However, there is no more to set here this time, so you can close it. The rest of the settings are done from the Visual Studio side.

When you start Visual Studio 2010 on the client side, verify that Team Foundation Server is specified in source control. (It is set by default)

Select "Tools" and "Options" from the menu.

Select Source Control, Select Plug-ins from the tree on the left, and make sure Current Source Control Plug-ins is set to Visual Studio Team Foundation Server.

Select "Source Control" and "Environment", select "Team Foundation" in "Source Control Preferences", and set each item as necessary.

After confirming the settings, select "Team" "Connect to Team Foundation Server" from the menu.

When the Connect to Team Project dialog appears, click the Server button.

Click the Add button.

Enter the server name, or URL, where you just installed Team Foundation Server 2010. Click the OK button to confirm the connection, and if you can connect successfully, the dialog will close. If you can't connect, an error dialog will appear.

Verify that the server that you added is listed.

Verify that the server is available from the Team Foundation Server selection and click the Connect button.

In Team Explorer, right-click the team project collection in the root and choose New Team Project.

Enter a description for the name of the team project you want to create, and then click Next.

The Select Process Template dialog appears. You can choose MSF for Agile Software Development v5.0 and MSF for CMMI Process Improvement v5.0 as templates, but MSF for Agile Software Development v5.0 for personal development or small projects.

If you haven't created any team projects yet, you can only select Create an empty source control folder.

Confirm the settings and click the "Finish" button.

The creation of the team project begins.

When you're done, click the Close button.

You can see that the team project you created is displayed in Team Explorer.

Let's create a project now. You can create any project, but before you finish creating the project, check Add to Source Control at the bottom right of the dialog.

The Add to Source Control dialog appears, specifying in which folder to add the project to.

If necessary, you can create folders and specify where to add projects.

When you create a project, a "+" mark appears to the left of each file. This indicates that a new file has been created, but has not yet been checked into source control.

In addition, the Modify Held panel appears at the bottom of Visual Studio with a list of files that you have not checked in.

Click Check In here to check in all pending files.

A confirmation dialog is displayed, so select "Yes".

Wait a few moments for check-in to complete.

When the check-in is completed, a key mark is displayed in each file as shown in the figure on the right. This will bring the file checked into source control. The display around here will be the same as Visual SourceSafe.

You can double-click Source Control from Team Explorer to source control the server from within Visual Studio.

As shown in the figure on the right, you can see that the project you just created is checked in.

When you edit the code, it is automatically checked out and has a red check mark as shown in the figure on the right. If someone else is editing the file, you won't be able to check it out.

You can set this behavior control in Visual Studio options or in the management console.

To check in a modified file, right-click the file and choose Check In from the menu.

If you accidentally change your code, or if you want to revert to a previous state, select "Undo Pending Changes."

Summary

This section describes the setup steps to get into source control from Visual Studio. Source control is not just about managing sources, but also has various functions such as sharing source code with multiple people, exclusive control, version control, code comparison with past versions, access authority setting, etc. Also, while Visual SourceSafe is a source control only feature, Team Foundation Server also has other features such as automated builds, report output, work management, and SharePoint integration, so if you have the time, you may want to try using those features as well.