Build Windows 10 UWP in the cloud

By | July 17, 2015

I’m working on a new Windows 10 UWP at the present and went to set up my CI builds in, of course, Visual Studio Online. But it wasn’t as straightforward as I’d hoped.

Much to my dismay, I was met with this peculiar little gem:

2015-07-17T03:37:47.3088282Z      1>ValidateSolutionConfiguration:
2015-07-17T03:37:47.3098311Z          Building solution configuration “release|x86”.
2015-07-17T03:37:47.4358271Z ##[error](14,3): Error MSB4019: The imported project “C:\Program Files (x86)\MSBuild\Microsoft\WindowsXaml\v14.0\8.2\Microsoft.Windows.UI.Xaml.CSharp.targets” was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Wait, say what now? You can’t find files to build this thing, even though I said Visual Studio 2015 in my build definition. Bah.

Sure enough, a few searches on the forums and you’ll find out they haven’t installed the Universal Windows SDK on the Hosted Build machines yet. On one hand I can see where this would be understandable, but on the other WE’RE 13 DAYS OUT FROM WINDOWS 10 LAUNCH!

No matter, remember my previous post on creating your own custom build server and wiring it up to VSO? Here we are again. Although this time I managed to find a much cooler and faster way to do it! Walk with me now.

Step 1

Create your VM in Azure. To save yourself a little bit of time, choose the Windows 10 Enterprise VM with VS 2015 pre-installed


My recommendation during initial setup is to go for an A4 Basic machine. This makes setup go faster. Then you can downscale (2-core, 7gb or something) after things are good to go.

Step 2

Once the machine’s provisioned and ready for RDP, get on in there.

Once you’re in, you need only install 2 simple things.

Install the UWP SDK

The first, and most obvious, the UWP SDK:

You don’t need the emulators, of course, because you won’t be emulating on a build server. Next, next, next through the installer and git ‘er crackin’. You’ll really appreciate Azure’s bandwidth here ;)

Configure the machine as a build agent

In my last post on this topic I walked through installing TFS with only the Build Agent configuration. Turns out there’s a much easier and more targeted way of doing this.

Log in to your VSO project

Go to your Collection’s Settings



Build tab, Download the Agent


This downloads a small .zip file to your machine. Extract it to something brief. I use c:\buildagent

Once you’ve extracted it, fire up a Powershell Prompt As Administrator and head to that directory.

Once there, run the ConfigureAgent.ps1 script like:

c:\buildagent> .\ConfigureAgent.ps1

This kicks off a command prompt window. You’ll want to accept the default for all prompts except a couple:

1) put in the ‘https’ URL to your VSO account

2) Choose “Y” to install as a service

You’ll be presented with a Microsoft Account prompt to hit the VSO account, use an account that has build administration access in this prompt.

Once this finishes and the UWP SDK installed successfully, you’ll see your build machine show up in your build server lists!


Configure your build definition to use the ‘Default’ queue instead of the ‘Hosted’ one and you’re set! I set up a new queue (during the agent setup above, type in a queue name instead of accepting ‘default’) called “Win10-Capable” for my purposes, which shows up in my Build Definition like so:


And boomski. You’re building Windows 10 UWPs with your VSO setup. Enjoy.