Tying Team Projects to Visual Studio Projects                                
•        You have seen several different ways of modifying a Team project.
-        Specifically, you have seen configuration of Work Item Queries, Documents, Reports and Security
settings.
-        All of this is fine and dandy but what about actually tying all of this to real source code?
•        TFS Source Control is what ties Team projects with Visual Studio solutions and projects.
-        Each solution/project that you add to Source Control gets added under a node representing a Team
project.
•        For example, let’s assume you write an amazing Class Library project in C# called “JunkLib” and you
want to associate it with TFS.
-        Currently, it’s not added to SourceSafe or TFS Source Control.
-        You want to associate this project with your current Team project, “SampleTeamProject”.

•        Right-click the project and choose “Add Solution to Source Control…”


•        Assuming that “Visual Studio Team Foundation Server” was selected as the Source code control plug-in
for Visual Studio, a dialog appears:

•        This window allows you to place the project code in TFS Source Control under a node representing the
Team project.
-        The Advanced… button allows you to map the Solution file and the project separately.
•        When you click OK, the solution and project are added to Source Control.

•        The files in Solution Explorer each have a plus sign (+) next to them, representing their status as newly
added files.
-        These files have not been checked in yet.
-        You can right-click the solution and check them in.
-        After they are checked in, blue padlocks will appear next to files, indicating that they cannot be edited
until checked out again.
•        When you go back to Team Explorer, nothing appears different, even though your Visual Studio project
is tied to your Team project.
-        However, if you double-click “Source Control” in the Team Explorer, you will see the Source Control
Explorer appear.

•        The project is being stored under your Team project, accessible by other users with appropriate rights
to this project.
-        This is how Visual Studio projects are tied to Team projects.
•        You learn more about TFS Source Control in an upcoming chapter.
Merging and Dividing Team Projects                                                
•        Since Team projects are tied to Visual Studio projects through TFS Source Control, this simplifies the
process of merging and dividing Existing Team projects.
-        In essence, merging and dividing Team projects is all about moving Visual Studio projects to different
Team projects within Source Control.
-        Additional team projects items (such as documents) can be merely copied from one Team project to the
other.
•        To divide a Team project into two projects, step through the “New Team Project Wizard” to create
another Team project.
-        When prompted, you need to create a new source control branch from the previous Team project in
Source Control.
-        Then move the project items to the new project.
•        To merge two Team projects, it is even easier.
-        After moving the project items from one to the other, be sure to “end of life” the Team project you no
longer intend to use.
-        This can be accomplished by revoking user privileges to it.
•        Be sure to consult the VSTS documentation to make sure you don’t overlook any other migration steps.
Team Projects to Visual Studio Projects
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials