You can use Team Foundation Build to compile and test a Windows Store app.
Deploy a build agent that can compile Windows Store apps
Deploy the build agent
Apply a tag to the build agent
Enable your build agent to run unit tests
Define a build process that builds and tests Windows Store apps
Use older build process templates
Q & A
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.
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 Permission reference for Team Foundation Server.
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:
You are building a Visual C++ Windows Store app and you want to build a configuration that includes the x64 Platform.
You want to enable code coverage when you run your tests.
From Windows Start, run Team Foundation Server Administration Console.
The Team Foundation Server Administration Console appears.
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.
One way to make sure that your build process runs only on a build agent that is capable of compiling and testing Windows 8.x Store apps is to apply a tag to the build agents.
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.
The Build Agent Properties dialog box appears.
Under Tags, choose the Add new tag link.
The Add New Tag dialog box appears.
Specify a tag, such as WindowsStore.
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 8.x Store app.
Identify a user account (not NETWORK SERVICE) that you will use as the build service account. The build service account must meet these criteria:
Have Administrator privileges on the build server computer.
Be registered on your Team Foundation Server as a build service account. See Grant a build server permission to serve a team project collection.
Have Change and Read privileges on the drop folder, if any, that you plan to specify in your build definition. See Select a staging location and set up a drop folder.
Log on to the build server with your build service account credentials.
In the Build Configuration node of the Team Foundation Server Administration Console, choose Properties.
The Build Service Properties dialog box appears.
Choose Stop the service.
Under Run the Service as, choose Change, and then specify the credentials to your build service account.
Select Run the Service interactively.
Choose the Acquire button to install a developer license.
Choose the Certificate button to generate a certificate or to select one that you have already generated.
Choose Start, and then choose OK.
Leave the build service account logged on to the build server.
To build (and optionally test) a Windows 8.x 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.
To complete the following procedure, you must have the Edit Build Definition permission set to Allow. For more information, see Permission reference for Team Foundation Server.
To define a build process that builds and tests Windows Store apps
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).
Choose the New Build Definition link or select a build, open its shortcut menu, and choose Edit Build Definition.
If a TF225001 error message appears, configure a build controller.
On the Build Defaults tab, select the build controller that pools a build agent that you have deployed to build Windows 8.x 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.
On the Process tab:
In the Build node in the Projects box, specify one or more solutions or projects to build.
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 8.x Store apps, for example, WindowsStore.
If you want to run automated unit tests, follow these steps on the Process tab in the Test node:
Select the Automated Tests box, and then choose the ellipsis button (...).
The Automated Tests dialog box appears.
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.
On the Test runner menu, choose Visual Studio Test Runner.
In the Test assembly file specification box, type **\*test*.appx.
For information about other settings, see Run tests in your build process.
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.