Upgrade to Pro — share decks privately, control downloads, hide ads and more …

DotNet Meetup - Jan 2017 - Cake

DotNet Meetup - Jan 2017 - Cake

Presentation deck for CAKE (C# Make)

Gareth Burns

January 23, 2017

More Decks by Gareth Burns

Other Decks in Programming


  1. Introduction to Cake (C# Make) • What is Cake? •

    What makes Cake different? • Format of Cake Scripts • How to get started with Cake • Resources • Examples • Example extended • Thoughts
  2. What is Cake? • Cake is a tool for building

    code • It allows you to build code in C# • It is cross platform compatible • You should always get the same experience • It integrates with other tools • Continuous Integration • Unit Testing • Build tools • It’s Open Source
  3. What makes Cake different? • Why would you use Cake?

    • Building .NET Core applications on different platforms • You don’t want to get bogged down in other languages • You want to use your C# skills • You already have tools in place and want to just change the build script provider • You want the flexibility of Open Source software Cake is not a Continuous Integration platform and shouldn’t be used for this purpose
  4. Format of Cake Scripts • There are some key components

    • Tasks • Dependencies • Criteria • Extending it out further with • Error Handling • Setup and Teardown • Arguments and variables • and more…….
  5. Tasks • Tasks are the basic building blocks of Cake

    • Tasks essentially define a build • A cake build script is a list of tasks
  6. Dependency • Dependencies allow you to chain tasks together •

    When you run your script you call the last task in the dependancy chain
  7. Criteria • Conditions that have to be satisfied before a

    task is run • If you call a chain then these can stop everything
  8. How to get started with Cake • cakebuild.net • Getting

    Started Section • Bootstrapping • Basic example script • Documentation • Fundamentals of Cake • Extensions • Tooling • Reference • Key commands, properties and inbuilt methods
  9. Examples on the website • Example with bootstrapped script online

    • Scripts run through Powershell • Permissions are critical here • You can run on Linux using Mono and Bash • Example includes • .NET Solution • Class library • Unit Test Project • Cake Script • Cleans, builds and tests
  10. Extending the example • Adding a console application to run

    a basic program • Uses the existing class library DLL • Changes to the example Build script • Adding tasks • Build the Console application • Clean out a deployment location • Deploy to a location • Running the deployed application • Let’s have a look
  11. Outcomes – My thoughts • Powerful tool • Cross platform

    (.NET CORE Ready) • Easy to pick-up • .NET friendly • Integrates with various existing tools • Does require some exposure and experience • Not sure exactly what the motivation to move to it would be