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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

1. As the TFSBuild command utility needs a number of parameters in order to start a<br />

build, you first need to determine the parameters to be used, as follows.<br />

a. <strong>Team</strong> <strong>Foundation</strong> <strong>Server</strong> – The TFS URL where the solutions being built<br />

are checked in.<br />

b. <strong>Team</strong> Project – The name of the team project which you want to build.<br />

c. Build Type – The build type that you created using the Build Type Wizard in<br />

Step 1.<br />

d. Build Machine – The name of the build server that you want to use for<br />

building your project. This is an optional parameter; by default, it uses the<br />

build server specified in the team build type.<br />

e. Build Directory – The path to the directory where the build occurs. This is an<br />

optional parameter; by default, it uses the path specified in the team build<br />

type.<br />

2. Create the build command as follows:<br />

TfsBuild start <br />

If you plan to override the build machine name and build directory path specified<br />

while creating the build type, the command would then be as follows:<br />

TfsBuild start <br />

/m: /d:<br />

Step 3 – Test the TFSBuild Command Line<br />

In this step, you test that the TFSBuild command is working correctly.<br />

1. Open the <strong>Visual</strong> <strong>Studio</strong> command prompt<br />

2. Type the TfsBuild command that you created in Step 2.<br />

3. Review the output to make sure that no errors occurred and that the build was created<br />

successfully.<br />

Step 4 – Create a Batch File<br />

In this step, you create a batch file that will be used for scheduling the builds.<br />

1. Open Microsoft Notepad and type following command; please note that the full path<br />

to the TFSBuild.exe file is specified so that it can run from Windows command<br />

prompt. The following is an example of the command:<br />

"C:\Program Files\Microsoft <strong>Visual</strong> <strong>Studio</strong> 8\Common7\IDE\TFSBuild" start<br />

<br />

If you override the build machine and build directory path, the command in the batch<br />

file would be as follows:

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

Saved successfully!

Ooh no, something went wrong!