0 out of 1 rated this helpful - Rate this topic

Build and test a Windows Store app using Team Foundation Build

Tip Tip

Is your team project hosted on Visual Studio Online? If you do not need to run unit tests, you might be able to skip deploying your own build agent and instead use a hosted build controller.

Required permissions

You must be a member of the Administrators group on the build server and your Manage build resources permission must be set to Allow. For more information, see Team Foundation Server permissions.

  1. Locate or install a build server and configure a build agent on a computer that is running Windows 8.1.

  2. Install Visual Studio on the build server. In most cases, you can install the same version of Visual Studio that your team uses on its dev machines.

    In a few cases, you must install Visual Studio Professional, Visual Studio Premium, or Visual Studio Ultimate:

    See Installing Visual Studio.

  3. From Windows Start, run Team Foundation Server Administration Console.

    The Team Foundation Server Administration Console appears.

  4. In the tree pane, expand the name of the server, and then choose the Build Configuration node.

    Information about the build server appears in the content pane. If the Configure Installed Features link appears, you must complete the initial configuration of the build server. See Set up Team Foundation Build Service.

Build Server Administration Console

One way to make sure that your build process runs only on a build agent that is capable of compiling and testing Windows Store apps is to apply a tag to the build agents.

  1. In the Build Configuration node of the Team Foundation Server Administration Console, complete one of these steps:

    • Choose New Agent.

    • Locate a build agent that you want to use to build your Windows 8.1 apps, and then choose its Properties link.

  2. The Build Agent Properties dialog box appears.

  3. Under Tags, choose the Add new tag link.

    The Add New Tag dialog box appears.

  4. Specify a tag, such as WindowsStore.

Tag the build agent

If you need to run unit tests, continue to the next section. Otherwise, you can skip to Define a build process that builds and tests Windows Store apps.

You can enable your build agent to run unit tests on your Windows Store app.

  1. Identify a user account (not NETWORK SERVICE) that you will use as the build service account. The build service account must meet these criteria:

  2. Log on to the build server with your build service account credentials.

  3. In the Build Configuration node of the Team Foundation Server Administration Console, choose Properties.

    Select Properties

    The Build Service Properties dialog box appears.

    Run the build service as an interactive process
  4. Choose Stop the service.

  5. Under Run the Service as, choose Change, and then specify the credentials to your build service account.

  6. Select Run the Service interactively.

  7. Choose the Acquire button to install a developer license.

  8. Chose the Certificate button to generate a certificate or to select one that you have already generated.

  9. Choose Start, and then choose OK.

  10. Leave the build service account logged on to the build server.

To build (and optionally test) a Windows Store app, you must apply a few settings in your build definition. The following procedure describes how to define a build process that is based on the Default Template.

Required Permissions

To complete the following procedure, you must have the Edit Build Definition permission set to Allow. For more information, see Team Foundation Server permissions.

To define a build process that builds and tests Windows Store apps

  1. In Team Explorer, make sure you are connected to the team project (Keyboard: Ctrl + 0, C), and then open the Builds page (Keyboard: Ctrl + 0, B).

  2. Choose the New Build Definition link or select a build, open its shortcut menu, and choose Edit Build Definition.

    Tip Tip

    If a TF225001 error message appears, configure a build controller.

  3. On the Build Defaults tab, select the build controller that pools a build agent that you have deployed to build Windows Store apps, as explained previously in this topic.

    Specify the staging location option you want. See Select a staging location and set up a drop folder.

  4. On the Process tab:

    1. In the Build node in the Projects box, specify one or more solutions or projects to build.

    2. In the Advanced node, in the Agent Settings sub-node, in the Tags Filter box, specify the tag that you applied to build agents that you are using to build Windows Store apps, for example, WindowsStore.

  5. If you want to run automated unit tests, follow these steps on the Process tab in the Test node:

    1. Select the Automated Tests box, and then choose the ellipsis button (...).

      The Automated Tests dialog box appears.

    2. Complete one of these steps:

      • To add a test run, choose Add.

      • To modify a test run, choose it, and then choose Edit.

      The Add/Edit Test dialog box appears.

    3. On the Test runner menu, choose Visual Studio Test Runner.

    4. In the Test assembly file specification box, type **\*test*.appx.

    5. For information about other settings, see Run tests in your build process.

  6. Specify any other settings that your build process requires. For more information, see Create or edit a build definition.

If your build process template is from an earlier version of TFS, you will need to modify your template if you want to build a Windows 8.1 app. See Use an earlier build process template to build some kinds of apps.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.