Using Cake tasks to build steps

Using Task Runner Explorer to run build tasks written in Cake scripts is easier and more convenient. This is usually done through Cake Extension for Visual Studio or by directly invoking the Cake bootstrapper file. However, there is an alternative that is more efficient, which is to run the Cake build script using the TeamCity CI tool.

The TeamCity build steps can be used to execute Cake scripts as part of the build steps execution processes. Let's create a build step that executes the Cake script for the LoanApplication project by following these steps:

  • Click on Add Build Step to open a New Build Step window.
  • In the Runner type, select PowerShell, since the Cake bootstrapper file will be invoked by PowerShell. ...

Get C# and .NET Core Test Driven Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.