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.
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
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!