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.

Although the <strong>Team</strong> Build feature in TFS does not support scheduled builds from the user<br />

interface, you can use the Microsoft Windows Task Scheduler to run the TFSBuild<br />

command utility to start builds at a predetermined time.<br />

To create a scheduled build<br />

1. Create a TFSBuild command line as follows:<br />

TfsBuild start <br />

2. Place the command line in a batch file.<br />

3. Create a Windows Scheduled Task that runs the batch file at your desired interval.<br />

Additional Resources<br />

• For more information, see “Chapter 9 – Setting Up Scheduled Build <strong>with</strong> <strong>Team</strong><br />

Build” in this guide.<br />

• For more information about setting up scheduled build, see “How To – Set Up a<br />

Scheduled Build <strong>with</strong> <strong>Visual</strong> <strong>Studio</strong> <strong>Team</strong> <strong>Foundation</strong> <strong>Server</strong>” in this guide.<br />

Test-Driven <strong>Development</strong><br />

• Run code analysis on each build.<br />

• Run automated tests on each build.<br />

• Consider setting builds to fail when automated tests fail.<br />

Run Code Analysis on Each Build<br />

Use code analysis as part of the build to improve build quality. You can configure a code<br />

analysis step in the build to help ensure that your code meets certain quality standards,<br />

ensuring that security, performance, portability, maintainability, and reliability rules are<br />

passed.<br />

To turn on code analysis for a build type, you can either select the code analysis check<br />

box in the <strong>Team</strong> Build Type wizard when you create the new <strong>Team</strong> Build Type, or you<br />

can modify the TFSBuild.proj file after the build type has been created.<br />

To enable code analysis in the TFSBuild.proj file<br />

• If you want all projects to run code analysis, regardless of project settings, change the<br />

tag to Always.<br />

• If you want to run code analysis on each project based on project settings, change the<br />

tag to Default.<br />

Additional Resources<br />

• For more information about automatic code analysis as part of a build, see “How To –<br />

Automatically Run Code Analysis <strong>with</strong> <strong>Team</strong> Build in <strong>Visual</strong> <strong>Studio</strong> <strong>Team</strong><br />

<strong>Foundation</strong> <strong>Server</strong>” in this guide.

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

Saved successfully!

Ooh no, something went wrong!