devfunkd
devfunkd

Reputation: 3234

Is it possible with TFS to use a build definition to run just a bat file?

Is it possible with TFS 2012 to use a build definition to run a bat file?

My application built on TeamCity by simply running a build.bat that did everything (Build, Test, Package, Deploy). I've tried looking online for a way I can run a build on TFS that JUST runs the build.bat (nothing else) but I haven't been able to figure out a way to do it using a build definition.

Upvotes: 0

Views: 261

Answers (2)

You should upgrade you TFS server to take advantage of more modern tooling. In TFS 2015 microsoft introduced a new build system that will do exactly what you need.

It has a task to execute a bat file and you can use that task only.

Upvotes: 1

ds19
ds19

Reputation: 3165

  1. You can set the build definition to build a dummy solution then set the Post-Build Script Path argument to the build.bat.
  2. You can customize the build template to just run the build.bat.

You should try to separate the activities because if the Package (or Deploy) activity is failing then you have to build (and test) again: "build once deploy many"

Upvotes: 2

Related Questions