3

I currently have a .Net console application that I use to perform build and release tasks. At the moment I run this application locally using PowerShell. The application effectively moves data between databases via web services.

I'm looking to automate build and release tasks using VSTS. It wasn't clear to me how I could run my console application in VSTS. I want to use my application in multiple projects.

This documentation suggests JavaScript build tasks can be created - but I don't really want to port my code.

Is there somewhere I can upload my console application into VSTS that I can then call using a PowerShell build task? Or can I create a bespoke build task that allows .Net code? Should I checkin my application as code?

How can I execute a .Net application during a VSTS build task?

James Wood
  • 17,286
  • 4
  • 46
  • 89
  • yes,you can use vsts powershell task to run consoleapp.please go through https://learn.microsoft.com/en-us/vsts/build-release/tasks/deploy/powershell-on-target-machines – Siva palla Nov 15 '17 at 14:49
  • @Sivapalla, where would you place the console application within VSTS in this case? – James Wood Nov 15 '17 at 15:18

1 Answers1

4

Couple of options. You could create a custom task and package the exe in the task.

Option two is commit the exe to source in a tools folder.

Option three. Store in blob storage and pull during your build.

Once it is on the machine you can use either the PowerShell or the Command Line task to run it.

Donovan
  • 598
  • 2
  • 7