DevOps for Desktop: How to use Self-Hosted agent for Win10 UWP Desktop Apps in Azure DevOps Pipeline
Published Jul 25 2019 11:08 PM 4,362 Views

Default Azure DevOps Agents are good for general build environments, such as below:




You can get details of the environment by select the item and click the Details tab:




Comparing this offering, self-Host agent is convenient especially your projects have specific SDK dependencies or deployment targets are in-house.


Below guidelines are based on my experiences on Continuous Integration/Continuous Deployment Centennial hybrid Desktop apps (UWP, WinForm, .NET Core 3). which should work for most similar tasks requirements.




  1. Get Azure DevOps personal access token (PAT) by following
  2. Create one Win 10 machine, Win10 can be upgraded to 19H1
  3. Install Windows 10 SDK here:


  1. Install other specific SDKs if you need, for example Microsoft Advertisement SDK:


  1. Install VS2019 here:


  1. By default, Windows 10 has .Net 4.8 now. You can get other versions if necessary, for example, install 4.6.2 SDK:


  1. Download Agent for Windows according to the step:




  1. Click Download Agent, you will see more details commands, execute them one by one:



You will be prompted to input server url and PAT  (personal access token, it is generated at step 1) while running the config.cmd,  for details just follow this part:


Connect the Self-Host Agent to Azure DevOps


If you want to run this Agent as a Service, please open powershell as Admin permission, otherwise you can run run.cmd directly to read job running status in Window, such as:




Once the Agent is running, it will read environment info on the Agent host computer and will connect to Azure DevOps Pipelines from HTTPS. You may want to open this outbound connection in case there is some firewall blocked there. Refer to:


After setup and start the Agent successfully, in the Agent Pool you select in config.cmd, you will see the Agent status. I put my agent in ‘Default’ agent

pool here:




Configure Build pipeline to run job on the self-host agent


In Build Editor, select the Pool as ‘Default’, and then you can trigger it by committing code:





Configure Releases Pipeline to run job on the self-host agent


In Release Editor, you can choose “Default” as the Agent Pool as well in UI, and trigger it by previous build tasks:




Now the setup is completed, you can use your own agent to CI/CD Windows Desktop Apps in customized build environment at anytime and leverage the power of Azure DevOps as well!






Version history
Last update:
‎Nov 22 2022 12:21 PM
Updated by: