26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• If the shared dependency is clearly owned by a particular team, store it in that<br />

team’s team project.<br />

• If the shared dependency has no clear ownership, create a team project<br />

specifically for the shared code.<br />

2. Branch the dependency into your project.<br />

Once you have stored the dependency, branch the shared source or binaries into your<br />

project. Every time you perform a merge from shared to consuming project, you will<br />

pick up the latest source. This allows you to pick up changes on a regular schedule<br />

and to perform integration testing before impacting your main source tree.<br />

Additional Resources<br />

• For an introduction to branching and merging, see “Branching and Merging Primer”<br />

at http://msdn2.microsoft.com/en-us/library/aa730834(VS.80).aspx<br />

• For more information about branching, see “How to: Branch Files and Folders” at<br />

http://msdn2.microsoft.com/en-us/library/ms181425(VS.80).aspx<br />

• For more information about merging, see “How to: Merge Files and Folders” at<br />

http://msdn2.microsoft.com/en-us/library/ms181428(VS.80).aspx<br />

• For additional descriptions of how to branch and merge in <strong>Visual</strong> <strong>Studio</strong> 2005, see<br />

“Branching and Merging <strong>Team</strong> <strong>Foundation</strong> Source Control” at<br />

http://msdn2.microsoft.com/en-us/library/ms181423(VS.80).aspx<br />

Avoid Workspace Mapping to Support Cross-Project Dependencies<br />

In general, you should avoid dependencies that cross team projects and try to have all the<br />

related/dependent solutions/projects under the same team project. This reduces the need<br />

for build script customization. If you have a dependency, use project references to define<br />

it, or branch the dependency from a shared project into your project. You should avoid<br />

file references because they are more difficult to manage. The exception is when the<br />

dependent project is developed in parallel and you need real-time changes. In this case,<br />

you can consider using workspace mapping. However, you can still use branching in this<br />

case to create a buffer of isolation, if the dependent code is causing too many breaking<br />

changes.<br />

Additional Resources<br />

• For more information about creating a workspace, see “How to: Create a Workspace”<br />

at http://msdn2.microsoft.com/en-us/library/ms181384(VS.80).aspx<br />

• For more information about editing a workspace, see “How to: Edit a Workspace” at<br />

http://msdn2.microsoft.com/en-us/library/ms245466(VS.80).aspx<br />

Create Workspace Mappings at the <strong>Team</strong> Project Root Level<br />

For new team projects, map your team project root ($/My<strong>Team</strong>Project) to a folder <strong>with</strong><br />

the same name on your local drive; for example, C:\<strong>Team</strong>Projects. Because mappings are<br />

recursive, your entire local folder structure is created automatically and will be exactly<br />

the same as the structure in source control.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!