Search code examples
tfsbuildazure-devops

Executing batch file or PowerShell script in Visual Studio Online after the publish event


Is there a way to execute a batch file or PowerShell script after the publish event on visual studio online?

Please note that I'm not referring to the "Right Click on project" and select "Publish" feature of Visual Studio, but to the post-publish event when using builds in Visual Studio Online


Solution

  • Do you use the new Build system of Visual Studio Online, or the classic MSBUILD? If you use the new system, just add a new task "PowerShell Script" after the Msbuild. If you're using directly Msbuild, you can add a "target" that you run after the deployment.