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.

How to Create Multiple Build Types<br />

To create multiple build types—for example, Release for Customers or Debug for Test<br />

<strong>Team</strong>—use separate team builds for each build type that interests you.<br />

To create a team build<br />

13. Open <strong>Team</strong> Explorer.<br />

14. Expand the team project for which you want to create a build.<br />

15. Right-click the <strong>Team</strong> Builds folder in the tree.<br />

16. Select New <strong>Team</strong> Build Type…<br />

17. Specify the name of the new team build type and click Next.<br />

18. Select the projects you wish to build, this should include the project that contains<br />

your unit tests.<br />

19. Select a build configuration (e.g. release or debug) and click Next.<br />

20. Specify the name of your build server, e.g. TFSRTM<br />

21. Specify a local build directory on your build server, e.g. c:\builds<br />

22. Specify a drop location for your build output, e.g. \\TFSRTM\NightlyBuilds and<br />

then click Next.<br />

23. Click the Run tests checkbox, select the test list you want to associate <strong>with</strong> the build,<br />

and then click Next.<br />

24. Click Finish to create the team build type.<br />

How to Create a <strong>Team</strong> Build for a Project That References Assemblies<br />

from Another Project<br />

To build a project that has dependencies on another team project, you need to get the<br />

source or assemblies from that project into the workspace on your build server. To do<br />

this, you need to edit your TFSBuild.proj file in order to add the assembly or the solution<br />

reference and override the BeforeGet event to get assemblies or sources from each of the<br />

required team projects.<br />

To build a project that references assemblies in another team project<br />

1. Check out the TFSBuild.proj script from Source Control Explorer.<br />

2. Add the following configuration setting under the PropertyGroup section:<br />

<br />

$(<strong>Team</strong>BuildRefPath)\..\tf.exe<br />

true<br />

SkipInitializeWorkSpace allows you to skip invoking the default tasks to delete and<br />

re-create the workspace on the build machine. The new property is used in the custom<br />

target BeforeGet (see below).<br />

3. Add the following configuration setting to the ItemGroup entries that map both the<br />

<strong>Team</strong> Projects and the solutions. Make sure that you provide the correct local paths<br />

for the build machine. Multiple mappings cannot share the same local folder and will<br />

result in a MappingConflictException exception in the CreateWorkspace task.

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

Saved successfully!

Ooh no, something went wrong!