VSTS CI CD for desktop apps

You will obviously need some sort of desktop deployment strategy. The easiest is to be using xcopy. Other alternatives include frameworks like ClickOnce, Windows Installer or Squirrel to name a few. I have a number of corporate apps that use Clickonce that I have deployed using vsts.

Now I am unable to understand how will VSTS help me with this?

Use VSTS to build the software first and include additional tasks to package your app. In my case, I use devenv.exe to generate ClickOnce packages, but you can include custom tasks by using powershell. The artifact of the build should now be the "packaged app". Then use the VSTS deployment to copy the "package" to some kind of hosting server from where your users can download the package. That could be either a web server or a fileserver or any location appropriate for your deployment strategy.

In this context, VSTS is an orchestration tool. It helps to trigger actions for you.

See Deploy an agent on Windows to see how to setup an on-premise agent.


To build and deploy the way as you used in VSTS, you can use below steps:

  1. Create a repository (Git or TFVC) and push your solution in the repository.
  2. Add build/release definitions.

    With CI build, enable the Continuous Integration in Triggers Tab. With CD deploy, enable Continuous deployment trigger in Pipeline Tab. The process for CI build and CD deploy, you can refer CI/CD.

  3. Add related tasks in your build/release definition.

    • Build VS Installer task: build setup project with msi file.
    • Nsis Build Task: embedded msi file in exe.
    • Command Line task: to execute the signtool command. Since Hosted agent has not signtool.exe, so you should use private agent which has the signtool.exe on the machine.
    • Copy files task, Copy Files Over SSH task or Windows Machine File copy task: upload the file exe to your web server.